• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1606
  • Last Modified:

Firefox won't load aspx pages

I created an aspx page to load an image.  It works great in IE 7 and 8, but when I try to open the page in Firefox, it asks "What should Firefox do with this file?".  Full dialog box is attached.
If I tell it to open in Firefox and it asks the same question over and over, but If I tell it to open in IE, it opens fine.
firefoxsave.jpg
0
roachpatrol
Asked:
roachpatrol
  • 3
  • 2
1 Solution
 
pschakravarthiCommented:
The site you listed is not sending a Content-Type in the HTTP header ( it should be sending text/html or similar so firefox will render it ). Since firefox has no content type it tries to guess it from the filename, and comes to the conclusion that it is downloading an ASPX *source* file.

Anyway to fix this tell Firefox ( and you whole computer system ) that it should render ASPX files as HTML. Add "text/html aspx" to a file named "~/.mime.types". If you only want firefox to have these ( technically wrong ) mime type changes then put it in "~/.mime.types.firefox" and change "helpers.private_mime_types_file" in "about:config" to that new file.
0
 
roachpatrolAuthor Commented:
If that is the case, this would only fix my computer.  It won't help other people who view the site, right?  Is there a way to embed the mime type in the page so Firefox can read it without modifying the client?  or does Firefox just not support aspx?  I created the page so I can modify it as needed.

Thanks
0
 
eguilhermeCommented:
are you loading the image by redirecting it to the image, or using like Response.BinaryWrite ?

if you are using BinaryWrite just add this:

    Response.ContentType = "image/jpeg";

and it should properly load the image
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
roachpatrolAuthor Commented:
I'm using response.writefile and am already setting the content type. I'll try the binarywrite tonight, but I think the problem is opening the page, before the response.* is even called.
0
 
pschakravarthiCommented:
Try puting..

Response.Contentype = "txt/html"
0
 
roachpatrolAuthor Commented:
Evidently, I forgot to put the type in the header of the aspx file.  Not really sure how that happened, but IE must have just assumed it was asp and went about its business.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now