开发者

png file not displaying

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 mis开发者_如何学运维sing with png files?


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


Very late but maybe not a wrong solution: If you rename a .jpg to .png it won't show in Microsoft's browsers. If you save the file again in Paint for example, it will change the mime-type or file-headers thus it will load after that change.

You can test this pretty easily:

  • Rename a .jpg file to .png
  • Load the page : The image is broken
  • Save the file as .png now
  • Load the page : The image will load now
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜