10

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
  • 32,199
  • 33
  • 105
  • 207
  • What does the configuration for your MmaWebClient site look like? Is it perhaps handling the request instead of this API site? (the path has ...WebClient... in it)? – Ian Mercer Sep 13 '16 at 14:28
  • The path of the client and the Web API are both "C:\DevFs..." and not "C:\Users..." – Bob Horn Sep 13 '16 at 15:35
  • Is the path correct for the Default Web Site in IIS? Does it point to C:\DevFs? – mattytommo Sep 13 '16 at 15:40
  • The default web site has this: %SystemDrive%\inetpub\wwwroot. It worked with that same setting on Win 7. – Bob Horn Sep 13 '16 at 15:42
  • 1
    Interesting: If I browse to index.html in file explorer, and open it with IE, the site comes up. So it seems like IIS is not making the connection to the right path/file. – Bob Horn Sep 13 '16 at 17:42
  • Did you get the solution for this? I am getting the same issue.. – Jeeva J Oct 29 '18 at 08:31
  • I did not. If you find an answer, it would be good to post here. – Bob Horn Oct 29 '18 at 12:58

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
2

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
  • 192
  • 2
  • 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