Images not showing in local IIS deployment but showing on IIS Express in visual studio 2013

I am developing an ASP.Net MVC 5 application. When I run the project on IIS Express (the default option), the images are displayed without issue. But after deploying to local IIS 8, no images are displayed. IIS and visual studio 2013 are on the same machine.

This image does not appear after deploying to local IIS, but it does appear in the IIS expression,

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


This image does not appear in IIS expression, but it does appear in Local IIS.

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


This is a weird situation, and what is your suggestion please?


source to share

1 answer

this article will help!

Proplem: There is no static content handler in IIS. To fix this problem, you need to enable the Windows feature related to IIS. As below picture

Internet Information Services → World Wide Web Services → General HTTP Capabilities → In static materials, check

Windows features screenshot



All Articles