Microsoft KB Archive/828330

= Cookieless Session State May Be Lost in ASP.NET Applications =

Article ID: 828330

Article Last Modified on 10/25/2005

-

APPLIES TO


 * Microsoft .NET Framework 1.1
 * Microsoft .NET Framework Software Development Kit 1.0 Service Pack 2

-



SYMPTOMS
If you use a relative path in an ASP.NET application, and you change the characters of the application name that appears in the URL from uppercase to lower case (or from lower case to uppercase), the cookieless session state is lost.



CAUSE
This problem occurs because the URLs in ASP.NET applications are case-sensitive.



RESOLUTION
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft .NET Framework 1.1 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date         Time   Version       Size       File name 18-Sep-2003 05:18  1.1.4322.947    258,048  Aspnet_isapi.dll 18-Sep-2003 05:18  1.1.4322.947     20,480  Aspnet_regiis.exe 18-Sep-2003 05:18  1.1.4322.947     32,768  Aspnet_state.exe 18-Sep-2003 05:18  1.1.4322.947     32,768  Aspnet_wp.exe 16-May-2003 01:49                   33,522  Installpersistsqlstate.sql 16-May-2003 01:49                   34,150  Installsqlstate.sql 18-Sep-2003 05:09  1.1.4322.947     94,208  Perfcounter.dll 19-Sep-2003 02:43  1.1.4322.947  1,216,512  System.dll 19-Sep-2003 02:40  1.1.4322.947    323,584  System.runtime.remoting.dll 19-Sep-2003 02:43  1.1.4322.947  1,253,376  System.web.dll 19-Sep-2003 02:42  1.1.4322.947    819,200  System.web.mobile.dll 19-Sep-2003 02:41  1.1.4322.947    569,344  System.web.services.dll 19-Sep-2003 02:44  1.1.4322.947  1,335,296  System.xml.dll 18-Sep-2003 05:13                   14,472  Webuivalidation.js



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the Standard Terminology That Is Used to Describe Microsoft Software Updates

Steps to Reproduce the Behavior
 In Microsoft Visual Studio .NET, create a C# ASP.NET application. To do this, follow these steps:  Start Visual Studio .NET. On the File menu, point to New, and then click Project. In the New Project dialog box, click Visual C# Projects under Project Types, and then click ASP.NET Web Application under Templates. Click OK. By default, WebApplication1 is created.</li></ol> </li>  Change the Web.config file of WebApplication1 to use a cookieless session state. To do this, paste the following code in the Web.config file: <sessionState cookieless=&quot;true&quot; > </li> Add a WebForm to the application.</li> Add a Directory to the application, and then put a user control in this directory.</li> Add a Hyperlink object to the user control.</li>  Add the following code to the user control: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here: this.HyperLink1.NavigateUrl=&quot;../WebForm1.aspx&quot;; End Sub </li> Add the user control to the WebForm.</li> Start your application, and then view your first Web page. The URL that appears in the address bar of your browser includes the session state, as in the following example:

http://localhost/WebApplication1/(uwvgovu0hljrmdqcl1aajf2f)/WebForm1.aspx

</li> Click the link that appears on this page.

You receive the same page again. This is the expected behavior.</li>  In the address bar of your browser, change the application name that appears in the URL to uppercase characters as follows: http://localhost/WEBAPPLICATION1/(uwvgovu0hljrmdqcl1aajf2f)/WebForm1.aspx </li> Click the link again.

You receive an &quot;HTTP Error 404&quot; error message and the cookieless session state is lost.</li></ol>

Keywords: kbbug kbfix kbqfe kbnetframe110presp1fix kbhotfixserver KB828330

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.