You are probably seeing locking on the session state. Check here for instructions on how to turn off locking: http://blogs.microsoft.co.il/blogs/idof/archive/2010/09/27/asp-net-compatible-wcf-services-concurrency-problem.aspx
Silverlight + RIA Services: How to return from one invoke operation before another invoke operation completes?
-
26-06-2022 - |
Question
I am having trouble polling to get the status of a long running invoke operation in my domain service. Specifically, all calls to the invoke operation function used to poll for the status are not returning until after the long running invoke operation finishes.
Here are the details:
- I am using Silverlight 5 with RIA Services.
- On my server side domain service class (example code below), I have a long running operation in an invoke operation named RunLongOperation.
- I also have a second invoke operation function named CheckStatusOfLongOperation that retrieves the status of the long running operation.
- In my Silverlight client, I call RunLongOperation. After that, every 5 seconds, I call CheckStatusOfLongOperation.
- According to Fiddler, every 5 seconds, CheckStatusOfLongOperation is being called. However, there is no response for any of the calls until RunLongOperation is complete.
What can I do to get CheckStatusOfLongOperation to return sooner?
ASP.NET Server code:
Public Class MyDomainService
Inherits DomainService
<Invoke()>
Public Function RunLongOperation() As String
'Long running operation, some database queries,
'but mostly in-memory operations
End Function
<Invoke()>
Public Function CheckStatusOfLongOperation() As String
'Checks a single variable and return status
End Function
End Class
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow