0

I am working with Backgorund worker. I have a Silverlight 5 application using WCF service.

When I call a background method it hits a service and this method takes some times to complete. During the time background worker is running, if i make some other service call it stops till the background method gets completed. I want to make parallel WCF service calls. I am not sure about the reason of the problem.

Alexei - check Codidact
  • 22,016
  • 16
  • 145
  • 164

1 Answers1

0

If your WCF is hosted in IIS, then the most probable cause of your second request not getting processed until the first WCF call is returned is the session lock put by IIS.

One way is to avoid using session for the processing or replacing with a custom session mechanism, as suggested in the above link.

If you provide more details about what your Background worker is trying to achieve, you might get a more targeted answer (i.e. maybe the processing can be done without locking the session).

Community
  • 1
  • 1
Alexei - check Codidact
  • 22,016
  • 16
  • 145
  • 164
  • i am using syncfusion to generate an excel and writing data into it fetching from database. this takes some time to be completed and everything is done at service sight, so basically i want to do is doing some other work till the excel gets generated. but i am not able to achieve this with background worker, service calls got stuck during the excel generation. Can you suggest some way? – Khan_Sobiya Apr 15 '16 at 17:19
  • Yes, but can you provide details about how WCF is hosted? How is the session implemented? My answer covers the case when using IIS and having a session, scenario which has the provided explanation. – Alexei - check Codidact Apr 15 '16 at 19:39