开发者

WCF Duplex Service problems with IIS AppPool recycling

I have a WCF Silverlight(3) Http Duplex Service set up in IIS. It works wonderfully until I recycle the ApplicationPool in IIS.

Connected SL clients who the开发者_开发百科n call methods on this duplex service then start to get TimeoutExceptions/CommunicationExceptions from the web service. Increasing the timeouts on the client side does not help.

Recycling does not seem to kill the underlying (duplex) http connection between the server and the client. When a client then calls a method on this service, IIS is unable to process it correctly.

If I recreate the proxy on the client everything works fine again. The problem is though, how do I know that I need to re-establish the connection to the server? not All the samples on the web just show how to handle disconnected clients but not what you do in case web service has been recycled. Completely restarting IIS is ok, since the http connection is closed in that case.

Any input is greatly appreciated.


It is expected behavior. This is how duplex http works. Duplex http communication uses reliable session. It means that everything works well until one of the side is closed. If the AppPool is recycled running service instances are terminated. Next time the client tryes to communicate with service it is not able to reach it (instance already does not exist) but because of reliable session it tryes it several times and then throws timeout. The only solution after timeout is to abort current proxy, create new client proxy and start new duplex communication.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜