Venkata K. C. Tata
Venkata K. C. Tata

Reputation: 5547

ASP.NET MVC 4 Application on IIS 8 not showing png images

I deployed asp.net mvc 4 application on windows 2012 server today. Everything is working fine but no png images are loading.

The below are the screenshots

When Accessed through webserver

When Accessed on localhost

These are some things I checked

I can load different images in this folder except the ".png"s.

Static Content was installed on my webserver. Static Content ticked on server

Check MIME types .. png are included there

Added the following code to route config

 routes.IgnoreRoute("{resource}.png")

Also checked the advanced Attributes by going into the properties of the file on webserver. The below is the screenshot.

Advance Attributes of file

Upvotes: 0

Views: 2026

Answers (1)

Majid
Majid

Reputation: 14243

Try use this:

<img src="<%= Url.Content("~/Content/logo.png")%>" alt=""/>

Upvotes: 1

Related Questions