Friday, August 28, 2009

ServerTooBusyException in WCF, possible cause

I wanted to post this confusing error and solution in case this can help anyone else.  Here is my general situation:

1. I was testing my WCF service hosted on a remote IIS server.  I had an identical IIS setup on my local development machine, and I wanted to switch to use it instead for better debugging support. 

2. When I ran the exact same service-calling code on my local machine, service calls always hit the ServerTooBusyException exception.  I checked my local IIS setup, confused that I was getting a different result when all of the virtual directories, ports, bindings, etc. were identical to the remote server.  I manually accessed my service’s URL in a local web browser, i.e. http://localhost/MyService/MyService.svc.  I got the error:

Service Unavailable


HTTP Error 503. The service is unavailable.

Huh?  Not very descriptive.  And being a newbie, I have had no luck following the convoluted steps of getting any sort of service trace logging to work – and I wasn’t even sure if this would help.  (As an aside, PLEASE comment if you know how to enable the type of logging that ultimately would have revealed this problem.)

3. Finally I found a vague comment on a forum regarding changed credentials, and it dawned on me: The account associated with the app pool I was using had had its password changed recently, and I hadn’t updated it on my local server to reflect this.  Once I re-set the credentials for the app pool user, everything worked perfectly.

 

I hope this post saves a headache or two.

1 comment:

Tore Aurstad said...

This was very helpful post, I had the exact same problem here, my Application pool was running under a identity and after changing a password recently for this identity account nothing worked, until your post gave me the solution. Thank you!