Fog Creek Software
Discussion Board

Is Microsoft playing dirty tricks with .NET?

According to , Microsoft ASP.NET returns wrong HTML if the browser is Mozilla. Can anyone confirm this? I find it a bit difficult to believe. It would be something so obvious monopolistic.


Monday, July 01, 2002

This isn't exactly true. ASP.Net does not return "wrong" HTML - it returns the HTML which it thinks is compatible with the browser making the request. By default, ASP.Net uses a class which only produces HTML 3.2-compliant tags/attributes/etc... It is then up to the settings in the machine.config file of the ASP.Net server to alter this default for browsers which can handle the newer tags/attributes/etc...

In the machine.config file which ships with ASP.Net, the browser match for Mozilla does not alter the default tag writer to be used, and hence only HTML 3.2-compliant tags are written. The server operator may certainly update the machine.config file to alter this, and it takes only one line in the proper place to do so (tagwriter=System.Web.UI.HtmlTextWriter).

One final note - MS is not responsible for maintaing this section of the machine.config file. This is the replacement of the older browsercaps.ini file, which also was not maintained by MS. A company called cyScape maintains this information (the makers of BrowserHawk).

In short - no, MS didn't do anything wrong here. Update the server's browser capabilities information and all is well, which is exactly how the system has always worked (with the older browsercaps.ini file and now with machine.config).

Ryan LaNeve
Monday, July 01, 2002

I cannot believe that this "mistake" was by chance. It is not the kind of things where Microsoft products behaviour is by chance. Most administrators will not notice or will not care. Thanks for the information, anyway.

Tuesday, July 02, 2002

*  Recent Topics

*  Fog Creek Home