开发者

Firefox 4 downloads ASPX files instead of serving them correctly

So I just upated to Firefox 4.0 and now my site seems to not be serving ASPX files incorrectly.

Instead of serving them as expected I'm prompted to download them. Other sites seem to be fine, and other browsers serve my pages as expected.

I'm thinking it has to do with some IIS settings not being set properly. (I'm using IIS6.) Any thoughts?

EDIT: Just noticed that the content-type of the page is coming back at "application/vnd.wap.xhtml+xml" instead of "text/html" if开发者_如何学Python that means anything to anyone...


It sounds like .net needs to be re-registered with IIS. The command for this is: C:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -i

A warning though: this will perform the equivalent of an iisreset. So be prepared for your web server to be down temporarily.

In my sample above, note that I am using .Net 2.0. You may have to run aspnet_regiis from the 4.0 folder if you are using that version of .net (I have had something as simple as installing .net 4.0 removing my 2.0 iis bindings).


Okay, this wasn't an obvious one, but I hope this helps someone.

My site uses a 3rd Party mobile device detection called FiftOne Degrees (http://51degrees.mobi).

This app uses some files (web_browsers_patch.xml and wurfl.xml.gz) to help browsers render the page correctly especially for mobile devices. My files were 6 months out of date and the new version of FireFox was not accounted for, causing the content-type to be set as WAP instead fo HTML.

So I updated to the newest versions of the files (from http://wurfl.sourceforge.net/) ... and it actually didn't fix the problem... BUT I've checked the "last updated" dates in these files and the last time they were updated was before FF4 came out, so I'll have to wait for the newer version of these files to come out (or maybe hack the files up a little to account for the updated User Agents).

For the time being (on test), I've just switched off the mobile device detector in the web.config.

Hope that helps someone.

Thanks everyone for the help!

EDIT: I raised another question to find a solution to this out of date WURFL. There's a few work arounds in there. Check out: WURFL not detecting FireFox 4 successfully


I'm by no means an IIS expert, but I think this is usually caused by the MIME type being set incorrectly for ASPX pages, or the ASP.NET parser not running correctly (or at all).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜