简体   繁体   中英

IIS 7.5 pointing requests to wrong physical path

I have a website set up on IIS 7.5. The host headers are working, the pages are returning fine. But when the browser requests an image, I get a 404 message. And I noticed that in the 404 details, the "Physical Path" that is specified is on the "c:\\inetpub\\wwwroot\\images...".

The reason this is so strange is that the website is on the "D:" drive: "d:\\inetpub\\wwwroot\\images...". The physical path is configured properly on IIS (I've done this a million times) but when attempting to serve images, it's using the wrong drive... why? Where is it getting this? I'm competently experienced with IIS for more than a decade and I have never seen this before. WTF??

You probably have two web sites binding to the same IP address, and one of them (with the physical path shown) is being honored.

If you add your application/virtual under the one website that's not being honor, you will see this error.

You need to set up the application under the web site that's being honored by IIS when using the IP.

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