Hosting a service in IIS? Better not under My Documents…

24 במאי 2006

tags: ,
5 comments

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.


Enjoy!

Add comment
facebook linkedin twitter email

5 comments

  1. Mills Chang14 במרץ 2008 ב 21:20

    You are right.
    I spent hours to try to figure out what's wrong until I saw your post.
    I was running the WCF Samples from Microsofts. I didn't put them in "My Documents" but the original unzip location which has very long path. After removing them to a simple path location, they run perfectly.
    Thanks very much.

  2. Huong Nguyen3 באפריל 2008 ב 12:28

    Many thanks. I got crazy because of this stupid bug 🙂

  3. spatosnal3 בספטמבר 2008 ב 21:31

    i don`t understand, but TY
    .

  4. Balaji15 בספטמבר 2008 ב 6:06

    Thanks for post

  5. DJ Burb1 במאי 2009 ב 18:22

    THANK YOU!!!!!!!!!!!!!

    Dude… this was getting on my nerves for a while

Comments are closed.