Article ID: 962204 - Last Review: July 17, 2009 - Revision: 2.1

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

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Expand all | Collapse all

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

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.

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  (http://support.microsoft.com/kb/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  (http://support.microsoft.com/kb/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.

STATUS

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

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:
http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx (http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx)
Author: radomirz;sharxu;
Writer: meidx
Tech Reviewer: radomirz;sharxu;
Editor: v-janhal

APPLIES TO
  • Microsoft ASP.NET 2.0
Keywords: 
kbhotfixserver kbexpertiseadvanced kbqfe kbsurveynew KB962204