I am building a new service to test some new features of WCF, and today I chose to host my service in IIS and not in Console Application as usual. This is a very common thing to do, and I though I will take me just a couple of minutes.
Surprisingly, after creating the service, and the .svc file, I got this error message:
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Not such descriptive message… ah???
Trying to compare with a basic HTTP sample taken from the SDK Samples, I actually built the samples from scratch. And still – Nothing!
After spending over an hour trying to figure out what went wrong, I copied the project directory to another location on my machine, and thing started to get going.
So, as a conclusion, If you're hosting a WCF service on IIS, set the virtual directory to a folder which is not under your My Documents folder, or another folder with security settings.