Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: You may not successfully browse an ASP.NET Web site if the User-Agent string contains more than 256 characters


View products that this article applies to.

Symptoms

When you visit an ASP.NET Web site, you may not successfully browse the Web site if the User-Agent string contains more than 256 characters. In addition, an exception that resembles the following may be thrown at the server-side:
[ArgumentException: Version string portion was too short or too long.]
  System.Version..ctor(String version) +2743958
  System.Web.Configuration.HttpCapabilitiesBase.GetClrVersions() +376
  System.Web.Configuration.HttpCapabilitiesBase.get_ClrVersion() +4

↑ Back to the top


Cause

For security reasons, ASP.NET truncates User-Agent strings that contains more than 256 characters. After the strings are truncated, some information that is contained in the string may become invalid. As a result, the Web server may not handle the request correctly.

↑ Back to the top


Resolution

For Windows 2000 Server, for Windows XP, and for Windows Server 2003, download and apply the hotfix that is described in Microsoft Knowledge Base article 962351.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
962351 FIX: The pop-out menus are not displayed when you use Internet Explorer 8.0 in standards mode to view an ASP.NET Web page that has dynamic menus
For Windows Vista and Windows Server 2008, download and apply the hotfix that is described in Microsoft Knowledge Base article 967535.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
967535 FIX: A hotfix is available to fix two problems in ASP.NET on IIS 7.0 for Windows Vista and Windows Server 2008
Note After you apply the hotfix, the User-Agent string limitation for ASP.NET is increased to 512 characters.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

When you visit a Web page, your browser sends the User-Agent string to the Web server that hosts the Web site. The Web server can use the User-Agent string to provide content that is customized for your specific browser.

To view the User-Agent string of your browser, type the following text into the address bar:
javascript:alert(navigator.userAgent)
For more information about User-Agent Strings, visit the following Microsoft MSDN website:

↑ Back to the top


Author: radomirz;sharxu;
Writer: meidx
Tech Reviewer: radomirz;sharxu;
Editor: v-janhal

↑ Back to the top


Keywords: KB962204, kbsurveynew, kbqfe, kbexpertiseadvanced, kbhotfixserver

↑ Back to the top

Article Info
Article ID : 962204
Revision : 3
Created on : 7/17/2009
Published on : 7/17/2009
Exists online : False
Views : 484