How can a newly added global.asax file make a mess of my WCF service

前端 未结 2 1895
余生分开走
余生分开走 2021-01-17 03:24

I have a silverlight app that uses WCF both by polling Duplex and \"normal\" async calls. everything was working fine, until I added a global.asax file.

After an ho

2条回答
  •  囚心锁ツ
    2021-01-17 04:04

    Yeah, this is a little known but annoying issue. The problem comes down to session state being enabled once you add a global.asax file to your web project. Once session state is enabled, the server will only execute the calls sequentially. Here are two articles with some more in-depth information:

    http://blogs.msdn.com/b/silverlightws/archive/2009/09/30/having-a-pollingduplex-service-and-any-other-wcf-service-in-the-same-website-causes-silverlight-calls-to-be-slow.aspx

    http://weblogs.asp.net/olakarlsson/archive/2010/05/20/simultaneously-calling-multiple-methods-on-a-wcf-service-from-silverlight.aspx

    This behaviour only occurs when using the browser networking stack, so your options are:

    1. Disable session state in your web project, or
    2. Use the client networking stack

    Hope this helps...

    Chris

提交回复
热议问题