13

I just upgraded from Win 7 to Win 10, and my IIS is now also v10. When browsing to my Web API on Win 7, it just worked. Now, on Win 10, I get a 404 NOT Found. I'm just hitting localhost. What I don't understand is why the physical path is different than what IIS shows, and why there are no contents in the physical path.

My physical path is this: C:\DevFs\Apps\MultipleModuleAssembly\Components\Main\MmaComponents\Source\Server\MmaWebApi

enter image description here

Yet, when I browse and get the failure, I see this:

enter image description here

Why is the physical path in the users folder? C:\Users\fs104679\Documents\My Web Sites\MmaWebClient-Site\MmaWebApi\api

When running the app, why is the physical path different than what I have set in IIS?

Bob Horn
  • 33,387
  • 34
  • 113
  • 219

3 Answers3

7

Just encountered this exact issue.

Turns out we had a site running in IISExpress, also bound to port 80. This seemed to break our defaultwebsite in IIS. Stopping IISExpress fixed it for us.

Changed the port of the IISExpress site so it can't happen again.

Make sure your port mappings are correct everywhere.

  • 1
    You might check if IIS uses `*:80:` binding, while IIS Express uses `*:80:localhost`. If so, then IIS Express's binding takes precedence for requests at `http://localhost`, as host header matches. – Lex Li Apr 23 '19 at 03:43
4

If using Visual Studios. There's a chance that the Physical Path is being stored in the ApplicationHost.config file under the .VS folder. Just go to the project site and change the path to the correct one.

Vash
  • 332
  • 3
  • 14
1

A virtual directory can have a WEB.CONFIG file with a redirect command. Thus, the URL points to a configured path and the WEB.CONFIG redirects you to another path.

  • +1 for the tip. I no longer have a way to verify if this is actually the case, but I don't think it is. Still, good information. Thanks. – Bob Horn Feb 03 '17 at 19:39