运行ASP.NET MVC应用程序的图像不能在IIS7上呈现

网站63.208.1.26/FreightRateCentral不渲染图像。 Chrome会为每个用户报告HTTP 404。 这是Windows 2008 R2和IIS 7的全新安装。起初,我认为这是一个.NET框架问题,但我确保应用程序池运行4.x. 然后,我检查了IIS请求筛选,但.jpg和.png扩展名未被阻止。 部署的站点文件位于wwwroot下的子文件夹中。 还有哪些其他问题可能导致网站正确呈现图像? 感谢您的帮助和指导!

正如Chrome正确报告,这是一个path问题。

HTML标记说,例如:

 <ul class="payment-listing"> <li> <a href="JavaScript:void(0);" title="Visa"> <img src="/Content/NewImages/img-visa.png" alt="Visa" width="49" height="29" /> </a> </li> <li> <a href="JavaScript:void(0);" title="Master Card"> <img src="/Content/NewImages/img-master-card.jpg" alt="Master Card" width="49" height="29" /> </a> </li> <li> <a href="JavaScript:void(0);" title="Card"> <img src="/Content/NewImages/img-card.jpg" alt="Card" width="49" height="29" /> </a> </li> <li> <a href="JavaScript:void(0);" title="Discover"> <img src="/Content/NewImages/img-discover.jpg" alt="Discover" width="49" height="29" /> </a> </li> </ul> 

正确的path是http://63.208.1.26/FreightRateCentral/Content/NewImages/ 。 换句话说,或者从img src标签( <img src="Content/NewImages/img-master-card.jpg"> )中添加第一个斜线,或者添加FreightRateCentral目录( <img src="/FreightRateCentral/Content/NewImages/img-master-card.jpg" )。