Click here to Skip to main content
15,901,666 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'd like to develop a WCF service, and a Client.
I'd like to upgrade them also, but without restarting them.
To do this, i've hosted teh service in IIS.
In this way, i can update the service - by changeing the underlying dll -
flawlessly due to IIS hosting, but if a client is connected,
the client will fail after the next
call. Then i receive the MessageSecurityException.
If i restart the client, when the update finished it works fine...
Is there a way, to update them both without restarting them?

thx

collapo
Posted

1 solution

OK. the short answer is 'No, you cannot'.

Now when you compile a WCF service, it will generate .dll, which will be used when hosted on IIS, now remember that .dll will always run inside the process. so it will be executed by the App Pool in IIS, because .dll can not execute on its own. so when you update the .dll it will restart the app pool on IIS.

so what you can do is, handle the exception on client side, and then display an error page with 'connection lost' message (by passing a current page as query string), and a link with 'try again' which will redirect again to that page url, passed on query string.

You are not going to update the WCF service that frequently, so I don't see any problem with this.
 
Share this answer
 
Comments
collapo 4-Jun-10 0:42am    
Thanks Mate!

In the end I came up with the same solution, but without your in depth knowlegde.

I managed to do it with the less interaction with the client.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900