简体   繁体   English

IIS 7.5将请求指向错误的物理路径

[英]IIS 7.5 pointing requests to wrong physical path

I have a website set up on IIS 7.5. 我在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. 但是当浏览器请求图像时,我收到404消息。 And I noticed that in the 404 details, the "Physical Path" that is specified is on the "c:\\inetpub\\wwwroot\\images...". 我注意到在404细节中,指定的“物理路径”位于“c:\\ inetpub \\ wwwroot \\ images ...”上。

The reason this is so strange is that the website is on the "D:" drive: "d:\\inetpub\\wwwroot\\images...". 这很奇怪的原因是该网站位于“D:”驱动器:“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? 物理路径在IIS上配置正确(我已经完成了一百万次),但在尝试提供图像时,它使用了错误的驱动器......为什么? Where is it getting this? 这是怎么回事? I'm competently experienced with IIS for more than a decade and I have never seen this before. 我有十多年的IIS经验,我以前从未见过这个。 WTF?? 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. 您可能有两个绑定到同一IP地址的网站,其中一个(显示物理路径)正在受到尊重。

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. 您需要在使用IP时受到IIS尊重的网站下设置应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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