We currently have a production application used by about 400 people. The application used WSHTTP binding with our WCF services. When we do releases on the server side code, we normally do it late at night when few people are on. It is my understanding that an update will cause IIS to recycle and it will be seamless to the end-user.
- Is my understanding correct?
- Is there any reason we can’t update our WCF services in the middle of the day?
- Are there any impacts you’ve seen on users currently connected?
The users are going to be impacted only if endponts being used are sessionful, i.e.
a) enabled WCF security at message level, (my 2 cents
b) reliable session
That’s because, whenever any changes are made in folders being monitored by ASP.NET (there are good blogs on what directories are monitored), the application pool is unloaded and reloaded. Now, WCF stores the tokens (when using message security) in memory. If the application domain is unloaded, the token used to authenticate user is invalidated. So, if client tries to continue using it, service application doesn’t find it and throws.
Solution to this could be using a stateful security context token (SCT) in a secure session, the session can withstand the service being recycled,
http://msdn.microsoft.com/en-us/library/ms731814.aspx
P.S.: It’s always recommended to stop the IIS application pool at the time of deployment to avoid unexpected issues with ASP.NET Shadow copy.
HTH,
Amit