简体   繁体   中英

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

在此处输入图片说明

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

在此处输入图片说明

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?

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM