Microsoft KB Archive/834488

= BUG: Cookie-less session-state requests are broken when you install multiple versions of the .NET Framework on your computer and then you remove the .NET Framework 1.0 =

Article ID: 834488

Article Last Modified on 5/17/2007

-

APPLIES TO


 * Microsoft ASP.NET 1.1
 * Microsoft ASP.NET 1.0

-



SUMMARY
This article describes the problem that occurs when you have multiple versions of the Microsoft .NET Framework installed on your computer and when removal of the earlier version causes cookie-less session-state requests to break.



SYMPTOMS
When you install multiple versions of the Microsoft .NET Framework on your computer and then you remove the .NET Framework 1.0, cookie-less session-state requests are broken.



CAUSE
When you remove the .NET Framework 1.0, the version of Microsoft ASP.NET that is associated with the ASP.NET Internet Information Services (IIS) Registration Tool (Aspnet_regiis.exe) is removed from your computer. This action removes all the filters and removes all the mappings to the latest remaining ASP.NET Internet Server API (ISAPI) version that is installed on your computer. This action also sets the wrong name for the w3svc/filters/FilterLoadOrder attribute and IIS cannot load the filter.



RESOLUTION
To resolve this problem, manually add the Microsoft .NET Framework 1.1 filter in IIS. To do this, follow these steps:

Open IIS

 * 1) Click Start, point to Settings, and then click Control Panel.
 * 2) Click Administrative Tools, and then double-click Internet Service Manager. Internet Information Services opens.
 * 3) Double-click your   under Internet Information Services.

Note is a placeholder for the name of your computer.

Set the .NET Framework 1.1 filter in IIS

 * 1) In IIS, click Default Web Site.
 * 2) On the Action menu, click Properties. The Default Web Site Properties dialog box appears.
 * 3) Click the ISAPI filters tab.
 * 4) Click Add. The Filter Properties dialog box appears.
 * 5) Type .aspx in the Filter Name box.
 * 6) Click Browse.
 * 7) Locate the Aspnet_filter.dll file. By default, the Aspnet_filter.dll file is located in the C:\ \Microsoft .NET\Framework\v1.14322 folder.

Note is a placeholder for the Microsoft Windows folder on your computer.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.



Steps to reproduce the behavior
 Install the .NET Framework 1.0 and the .NET Framework 1.1 Remove the .NET Framework 1.0. Create a folder on your hard disk. For example, C:\.

Note  is a placeholder for the folder name on your hard disk in your computer.  Paste the following code in Notepad: <% ' -- ' Browse from ASPX to HTM to ASPX - Session should still be available in 2nd aspx ' -- Response.write (&quot;&quot; & ControlChars.Crlf & &quot;&quot; & ControlChars.Crlf & _ &quot; XSP Test Case Starting</P>&quot; & ControlChars.Crlf)

if Request.QueryString(&quot;Phase&quot;) = &quot;&quot; then Response.write (&quot;Please use QS Phase=Store or Phase=Get&quot; & ControlChars.Crlf) Response.write (&quot; XSP Test Case Finished</P>&quot; & ControlChars.Crlf & _   &quot;</BODY>&quot; & ControlChars.Crlf & &quot;</HTML>&quot; & ControlChars.Crlf) exit sub end if if UCase(Request.QueryString(&quot;Phase&quot;)) = &quot;STORE&quot; then Session(&quot;SessionStateUsageCookieless001_Name&quot;) = &quot;Martin Rienstra&quot; Session(&quot;SessionStateUsageCookieless001_City&quot;) = &quot;Redmond&quot; Session(&quot;SessionStateUsageCookieless001_State&quot;) = &quot;WA&quot; Session(&quot;SessionStateUsageCookieless001_FavoriteNumber&quot;) = 7 'Debug output for manual test Response.Write (&quot;Storing items into Session State&quot; & ControlChars.Crlf) Response.Write (&quot;SessionID: &quot; & Session.SessionID & ControlChars.Crlf) Response.Write (&quot;IsNewSession: &quot; & Session.IsNewSession & ControlChars.Crlf) Response.Write (&quot;IsCookieless: &quot; & Session.IsCookieless & ControlChars.Crlf) Response.Write (&quot;Timeout: &quot; & Session.Timeout & ControlChars.Crlf) Response.Write (&quot;Name: &quot; & Session(&quot;SessionStateUsageCookieless001_Name&quot;) & _  ControlChars.Crlf) Response.Write (&quot;City: &quot; & Session(&quot;SessionStateUsageCookieless001_City&quot;) & _  ControlChars.Crlf) Response.Write (&quot;State: &quot; & Session(&quot;SessionStateUsageCookieless001_State&quot;) & _  ControlChars.Crlf) Response.Write (&quot;FavoriteNum: &quot; & _  Session(&quot;SessionStateUsageCookieless001_FavoriteNumber&quot;) & _   ControlChars.Crlf) else if Session(&quot;SessionStateUSAGECookieless001_Name&quot;) <> &quot;Martin Rienstra&quot; then Response.Write (&quot;[XSP_TEST_FAILURE] Name in Session is incorrect: &quot; & _   Session(&quot;SessionStateUSAGECookieless001_Name&quot;) & ControlChars.Crlf) end if         if Session(&quot;SessionStateUsageCookieless001_CITY&quot;) <> &quot;Redmond&quot; then Response.Write (&quot;[XSP_TEST_FAILURE] City in Session is incorrect: &quot; & _   Session(&quot;SessionStateUsageCookieless001_City&quot;) & ControlChars.Crlf) end if     if Session(&quot;sessionstateusagecookieless001_state&quot;) <> &quot;WA&quot; then Response.Write (&quot;[XSP_TEST_FAILURE] State in Session is incorrect: &quot; & _   Session(&quot;sessionstateusagecookieless001_state&quot;) & ControlChars.Crlf) end if         if Session(&quot;SESSIONSTATEUsagecookieless001_FavoriteNumBER&quot;) <> 7 then Response.Write (&quot;[XSP_TEST_FAILURE] FavNum in Session is incorrect: &quot; & _    Session(&quot;SESSIONSTATEUsagecookieless001_FavoriteNumBER&quot;) & ControlChars.Crlf) end if  'Debug output for manual test Response.Write (&quot;Retrieving items into Session State&quot; & ControlChars.Crlf) Response.Write (&quot;SessionID: &quot; & Session.SessionID & ControlChars.Crlf) Response.Write (&quot;IsNewSession: &quot; & Session.IsNewSession & ControlChars.Crlf) Response.Write (&quot;IsCookieless: &quot; & Session.IsCookieless & ControlChars.Crlf) Response.Write (&quot;Timeout: &quot; & Session.Timeout & ControlChars.Crlf) Response.Write (&quot;Name: &quot; & Session(&quot;SessionStateUsageCookieless001_Name&quot;) & _  ControlChars.Crlf) Response.Write (&quot;City: &quot; & Session(&quot;SessionStateUsageCookieless001_City&quot;) & _  ControlChars.Crlf) Response.Write (&quot;State: &quot; & Session(&quot;SessionStateUsageCookieless001_State&quot;) & _  ControlChars.Crlf) Response.Write (&quot;FavoriteNum: &quot; & Session(&quot;SessionStateUsageCookieless001_FavoriteNumber&quot;) & _  ControlChars.Crlf) end if Response.write (&quot; XSP Test Case Finished</P>&quot; & ControlChars.Crlf & &quot;</BODY>&quot; & _ ControlChars.Crlf & &quot;</HTML>&quot; & ControlChars.Crlf) %> </li> Save the file as.

Note is a placeholder for the name of the file.</li>  In Notepad, click New on the File menu, and then paste the following code in Notepad: <HTML> <BODY> XSP Test Case Starting</P> XSP Test Case Finished</P> </BODY> </HTML> </li> Save the file as.

Note is a placeholder for the name of the file.</li> Create another .aspx file. To do this, follow these steps: <ol style="list-style-type: lower-alpha;">  Paste the following code in Notepad: <% ' --

' Browse from ASPX to HTM to ASPX - Session should still be available in 2nd aspx ' -- Response.write (&quot;Hello World&quot;)

%> </li> Save the file as.

Note is a placeholder for the name of the file.</li></ol> </li> Create a virtual directory in IIS.</li> Map the virtual directory that you created in step 9 to your local folder .</li> In Microsoft Internet Explorer, type the following URL in the address bar:

http:// / /.

Note The session ID is embedded in the path of the URL, and the URL in Internet Explorer appears as the following:

http:// / //

</li> In the URL, change the file name to. Do not changed the sessionID that is embedded in the URL. Notice that this page retrieval is not successful.</li> In the URL, change the file name to. This leaves the session ID that is embedded in the URL unchanged. Notice that this page is retrieved without fail.</li></ol>

<div class="references_section">