kerabanaga
kerabanaga

Reputation: 53

Images not shown in IIS Local deploy but they shown on IIS Express in visual studio 2013

I am developing an ASP.Net MVC 5 application. When I am running the project on IIS Express (default option), images are shown without problem. But after deploying on local IIS 8, the images are not shown. IIS and visual studio 2013 are on the same machine.

This image is not shown after deploying on Local IIS, but it is shown on IIS express ,

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

This image is not shown on IIS express but it is shown on Local IIS,

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

It is a strange situation, and what is your suggestion please?

Upvotes: 3

Views: 2898

Answers (1)

Hatem Hamad
Hatem Hamad

Reputation: 96

this Article will help !

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

Upvotes: 7

Related Questions