Handling Multiple requests for WCF Service in Silv

2019-08-28 16:10发布

问题:

I have a number of operations in my WCF Service that have been decorated with the following attributes

[OperationContract(AsyncPattern = true)]

IAsyncResult BeginSomething1(...)

Response EndSomething1()

[OperationContract(AsyncPattern = true)]

IAsyncResult BeginSomething2(...)

Response EndSomething2()

I notice that no matter how I configure my WCF service I can never get

BeginSomething1 and BeginSomething2 to be running simultaneously together.

That is say I call BeginSomething1 at the client first, BeginSomething2 does not appear to run at the server until EndSomething1 completes.

My WCF service is made to have AspNetCompatibilityRequirements set to true so Im just wondering if this has something to do with it...

It may require some substantial work if I am required to turn this off so was just hoping if there was a workaround?

Thanks

回答1:

Couple of questions for you:

  • What do you have the WCF Throttling configured to on the service?
  • On the client, are you chaining the requests? Make sure you're not waiting for the completion of the first call.