UnhandledExcepSean
UnhandledExcepSean

Reputation: 12804

WCF Updating Services

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.

  1. Is my understanding correct?
  2. Is there any reason we can't update our WCF services in the middle of the day?
  3. Are there any impacts you've seen on users currently connected?

Upvotes: 1

Views: 99

Answers (2)

tom redfern
tom redfern

Reputation: 31760

In answer to your questions

  1. I do not agree that recycling the host process will be seamless to users. Any requests being processed will be unloaded and the consumers will receive availability-based exceptions
  2. Yes, the same reason as 1.
  3. Yes, their requests fail and they receive at best a soap fault which they have to then handle.

If you have a high availability requirement you ideally should route requests to a failover endpoint while you are patching the primary one. Or you could consider using queues rather than synchronous calls which would give you the ability to update during business hours.

Upvotes: 1

amit
amit

Reputation: 2123

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

Upvotes: 1

Related Questions