0

While testing in visual studio all work good, but when I am deployed in iis it doesn't show image what's the cause of a problem? even when i test it on iis express through WebMatrix it work but not worked in iis.

sandip
  • 11
  • 4
  • Possible duplicate of [CSS, Images, JS not loading in IIS](https://stackoverflow.com/questions/10512053/css-images-js-not-loading-in-iis) – Feras Al Sous Jul 01 '18 at 07:25
  • Is the folder where your images are stored included in your publish? – bsod_ Jul 01 '18 at 08:56
  • When deployed under IIS, load the page in browser and then right click on the broken image and click `open in new tab` and check if image path is correct. – Mohsin Mehmood Jul 01 '18 at 20:24

2 Answers2

0

Make sure that the Static Content feature is installed on the Web Server under the Role Services of IIS ---> Common HTTP Features.

The problem may be that IIS is not serving Static Content, check this link: http://adilmughal.com/blog/2011/11/iis-7-not-loading-css-and-image/

0

try this

<img src= "@Url.Content("~/path/img")">