views:

28

answers:

1

Hello All

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 then 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.

A: 

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.

Ladislav Mrnka
Yeah I came to the same conclusion. We are now just catching the exception on the client and reestablish the connection.
Manuel R.