[英]Image can load when running by IIS Express on Visual studio, but can't load when running by IIS
在C:\\WebApplication1\\WebApplication1
创建 Web 应用程序项目,如下所示。
文件Test/index.aspx
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>index page</h1>
<img src="../images/myimage1.png" />
</div>
</form>
</body>
</html>
在 Visual Studio 上通过 IIS Express 运行时可以加载图像,如下所示。
Test/index.aspx
,如下所示。
http://localhost/WebApplication1/images/myimage1.png
打开图像,如下所示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.