Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS - Physical Path Wrong

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?

like image 561
Bob Horn Avatar asked Sep 13 '16 13:09

Bob Horn


2 Answers

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.

like image 146
Justin Van Bibber Avatar answered Sep 30 '22 13:09

Justin Van Bibber


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.

like image 36
Vash Avatar answered Sep 30 '22 13:09

Vash