tags:

views:

201

answers:

2

i have a few png files in my asp.net 3.5 web app. the images displaying correctly in dev; however, when i load the app on the server, the png files do not display. i'm using w2k8 and iis. when i server another image file from same directory (jpg), it works. is there something i am missing with png files?

+1  A: 

This sounds like a permissions problem. Have you checked the permissions on one of the PNG files to be certain that they can be read by EVERYONE?

If you can access the server directly, can you see the images if you use a browser on the server and visit the local site? http://localhost/

Can you try view the PNG directly by URL from your browser? By that I mean entering the full URL to the PNG itself rather than the page that is showing the PNG. For example http://sstatic.net/so/img/logo.png

Bernhard Hofmann
it looks like everyone has read access. when i try to view the file in IE, it tries to download it instead of display it. i think that is the big clue - but i don't know what to do about it
mson
ok - the file was encrypted... not sure why a png is encrypted, but removing encryption fixed the issue.
mson
A: 

use src="<%= Url.Content("~/Images/MyImage.png") %>" not src="../../Images/MyImage.png"

Dylan