gpt4 book ai didi

asp.net-mvc - 图像未显示在 IIS Local 部署中,但它们显示在 visual studio 2013 的 IIS Express 上

转载 作者:行者123 更新时间:2023-12-01 10:45:46 25 4
gpt4 key购买 nike

我正在开发 ASP.Net MVC 5 应用程序。当我在 IIS Express(默认选项)上运行项目时,图像显示没有问题。但是在本地 IIS 8 上部署后,图像不显示。 IIS 和 visual studio 2013 在同一台机器上。

此图像在本地 IIS 上部署后不显示,但在 IIS express 上显示,

<img id="myimage"  src="@Url.Content('/Uploads/10.jpg')" />

此图像未显示在 IIS express 上,但显示在本地 IIS 上,

<img id="myimage2" src="~/Content/Images/10.png" />

这是一个奇怪的情况,请问您有什么建议?

最佳答案

这个Article会有帮助!

The Proplem is : static content handler is missing in IIS. To Solve it you need to enable a windows feature related to IIS Like in the picture below

Internet Information Services -> World Wide Web Services -> Common HTTP Features -> Static Content must be checked

Windows features screenshot

关于asp.net-mvc - 图像未显示在 IIS Local 部署中,但它们显示在 visual studio 2013 的 IIS Express 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26197013/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com