Silverlight PollingDuplex InnerChannel faulted with multipleMessagesPerPoll (serverPollTimeout)

烂漫一生 提交于 2019-11-29 11:27:25

I confirm the issue on a sample, with the same SDK and client versions.

The issue has some more implications on other browsers too: I am under the impression that MultipleMessagePerPoll doesn't seem to work correctly on them neither (Fiddler and Firebug show something which looks a lot like SingleMessagePerPoll)

However I could make it work by using the client Network stack (bypassing the browser network stack). This solution is however far from perfect, as cookies must be set manually in this case. It can can be annoying or a non-issue depending on your application.

To perform all http request through the client stack, use this before you start your service calls:

HttpWebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);

You could however be a little more specific, according to your needs.

If someone has a more satisfying answer, I would be glad to read it. If you are interested in reproducing the probleme, I have modified an old Tomek sample to use MultipleMessagePerPoll on SL4 instead of SingleMessagePerPoll on SL3.

N. Jensen

This problem can be caused by adding global.asax to the hosting web site. Adding sessions to the hosting site apparently screws up the wcf polling duplex service. I struggled with this issue for several days and by merely deleting the global.asax file from the host web site the hang in the service went away. The multiplemessagesperpoll was a false lead. It works fine.

See this for more:

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!