Windows WF Code Activity Collision on long running previous request - workflow-foundation-4

I have a code activity dll that I am calling from within another 3rd party application. Everything is working fine unless the code activity takes a long time to complete and another request comes through the 3rd party application. When that happens there is a collision and data from the first request gets returned to the second request.

Related

Why is dataverse taking so long to answer to simple requests?

I'm using Microsoft.PowerPlatform.Dataverse.Client to do requests on my dynamics 365 environment and every request takes a long time to finish, but the requests are processed nearly instantly on dataverse side. My project is .net core 5.
For exemple, in this picture you can see that it takes 17 seconds for the creation of a Contact on my project side (from sending request to receiving response):
There is the code with loggings:
However, I see on dataverse side that the creation is done in less than a second:
Why is it taking so long to return a response knowing that the contact has been created nearly instantly?
Would it be faster to create the contact without the entity references and then update it? If so, why?

Check how long request has been in IIS queue from within VB.net application

I am coming across the problem that we are able to monitor IIS queue lengths, but we can't tell from within the application how long a request has been sat there.
That means that when we log our response time, we are logging just the application response time, whereas what is more important to us is the amount of time the user at the other end has been waiting (which will include waiting on IIS queue).
I've had a good browse through the request object and can't find anything.
Any ideas?
Thanks
Mark

ASP.NET performance: find what consumes execution time

Recently we changed a dedicated server from Windows Server 2003 to a more powerful server, based on Window Server 2012. A problem appeared on the new server, that sometimes requests are running too slow.
I did an additional logging at various stages of requests, and get confusing data. For example, a call to web service method takes 7 seconds between PreRequestHandlerExecute and PostRequestHandlerExecute (tracked time in Global.asax), but at the same time there are log records made inside the called method, that show execution time of this method was less than a second (log records and the start and end of the method have same milliseconds). So it means that the method itself executed fast. The question is what consumed 7 seconds between PreRequestHandlerExecute and PostRequestHandlerExecute?
Note that the problem is not replicatable, I can never replicate it myself, but only see this in log happending to other people (I programmed an email notification sent to me when it happens that request takes more than 3 seconds).
Sometimes the execution time on some pages goes to such crazy values as 2 minutes, and from log records I have on different stages of the page execusion I cannot see what consumes that time. The problem did not exist on the old 2003 server.

Second concurrent page method call not working

I have two page method calls that I perform. One is a long request that performs alot of processing. The second one is used to retrieve the status of the first call. The problem is that the second call doesn't get a response until the first one has ended. Looking at fiddler, I see that the first page method call sends a request followed by the second page method sending a request back to back but I never get the second request in visual studio until the first ends. I thought ie7 allowed 2 concurrent requests at a time.

Long-running SOAP request on ASP.NET Web Service results in no response

We have a SOAP web service running on ASP.NET Web Services over IIS6 that exhibits a strange behavior when it processes a request that results in long server-time processing. Essentially if a request takes more than about 5 minutes to process on the server then IIS never sends the response back to the client, even though, from ASP.NET's perspective, the call completed. We know this because we write entries to an application log at the beginning and end of a web method call and those log entries do get written. However, no response is actually sent and the connection remains open, seemingly indefinitely. In one test, we saw the connection stay open for over 24 hours before we manually stopped the test client.
We have a test SOAP client that is able to detect the moment a response starts streaming down to it from the server and in the case where the server processing time takes too long, nothing is ever streamed down. Even with a large response payload, we should start seeing that response trickle down shortly after the web method's "end" application log entry is written, but we never see it.
The exact server processing time where things behave in this manor is hard to determine. We have one long-running test call that results in about 2.5 minutes of server processing time and that call results in a successful response to the client. We have another that takes about 8 minutes and that one fails as described above. So the threshold must be somewhere in between.
I suggest that you call a web method to start the execution of your needed task, than use another method to poll the server for the task's completion. I had the same problem 2 years ago and i solved it this way. The client queues a task on the server then after some specified intervals asks the server for the result of the task.
I hope that helps.

Resources