Wednesday, 13 February 2013

IIS7 /ASP.NET : Image does not display after deploying on IIS


IIS 7 ASP.NET, after deploying my web application on IIS image were not displaying

When I work with Visual studio default server everything works and displayed as required but when I deployed the application on IIS my images were not displaying.

I tried putting all different URL for my image, Like
ImageUrl="/Image/cal.png"
ImageUrl="../Image/cal.png"
ImageUrl="~/Image/cal.png"  But it didn’t helped me and then I thought there might be something IIS setting missing for this.

And when I verified the IIS installation setting, the “STATIC CONTENT” option of IIS was unchecked and hence it was not displaying the image.



After clicking the checkbox "True" everything worked as per expectation.

No comments:

Post a Comment