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.

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


View products that this article applies to.

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.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


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 ComputerName under Internet Information Services.

    NoteComputerName 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:\Winnt\Microsoft .NET\Framework\v1.14322 folder.

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

↑ Back to the top


Status

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

↑ Back to the top


More information

Steps to reproduce the behavior

  1. Install the .NET Framework 1.0 and the .NET Framework 1.1
  2. Remove the .NET Framework 1.0.
  3. Create a folder on your hard disk. For example, C:\MyFolder.

    Note MyFolder is a placeholder for the folder name on your hard disk in your computer.
  4. Paste the following code in Notepad:
    <%
    ' --------------------------------------------------------------------------------------
    ' Browse from ASPX to HTM to ASPX - Session should still be available in 2nd aspx
    ' --------------------------------------------------------------------------------------
    Response.write ("<HTML>" & ControlChars.Crlf & "<BODY>" & ControlChars.Crlf & _
    "<p>XSP Test Case Starting</P>" & ControlChars.Crlf)
    
    if Request.QueryString("Phase") = "" then
       Response.write ("Please use QS Phase=Store or Phase=Get" & ControlChars.Crlf)
       Response.write ("<p>XSP Test Case Finished</P>" & ControlChars.Crlf & _ 
       "</BODY>" & ControlChars.Crlf & "</HTML>" & ControlChars.Crlf)
       exit sub
    end if
       
    if UCase(Request.QueryString("Phase")) = "STORE" then
       Session("SessionStateUsageCookieless001_Name") = "Martin Rienstra"
       Session("SessionStateUsageCookieless001_City") = "Redmond"
       Session("SessionStateUsageCookieless001_State") = "WA"
       Session("SessionStateUsageCookieless001_FavoriteNumber") = 7
          
       'Debug output for manual test      
       Response.Write ("Storing items into Session State" & ControlChars.Crlf)
       Response.Write ("SessionID: " & Session.SessionID & ControlChars.Crlf)
       Response.Write ("IsNewSession: " & Session.IsNewSession & ControlChars.Crlf)
       Response.Write ("IsCookieless: " & Session.IsCookieless & ControlChars.Crlf)
       Response.Write ("Timeout: " & Session.Timeout & ControlChars.Crlf)
       Response.Write ("Name: " & Session("SessionStateUsageCookieless001_Name") & _
       ControlChars.Crlf)
       Response.Write ("City: " & Session("SessionStateUsageCookieless001_City") & _
       ControlChars.Crlf)
       Response.Write ("State: " & Session("SessionStateUsageCookieless001_State") & _
       ControlChars.Crlf)
       Response.Write ("FavoriteNum: " & _
       Session("SessionStateUsageCookieless001_FavoriteNumber") & _
       ControlChars.Crlf)
    else
       if Session("SessionStateUSAGECookieless001_Name") <> "Martin Rienstra" then 
    	Response.Write ("[XSP_TEST_FAILURE] Name in Session is incorrect: " & _
    	Session("SessionStateUSAGECookieless001_Name") & ControlChars.Crlf)
       end if		
       if Session("SessionStateUsageCookieless001_CITY") <> "Redmond" then 
    	Response.Write ("[XSP_TEST_FAILURE] City in Session is incorrect: " & _
    	Session("SessionStateUsageCookieless001_City") & ControlChars.Crlf)
       end if	
       if Session("sessionstateusagecookieless001_state") <> "WA" then 
    	Response.Write ("[XSP_TEST_FAILURE] State in Session is incorrect: " & _
    	Session("sessionstateusagecookieless001_state") & ControlChars.Crlf)
       end if		
       if Session("SESSIONSTATEUsagecookieless001_FavoriteNumBER") <> 7 then 
    	 Response.Write ("[XSP_TEST_FAILURE] FavNum in Session is incorrect: " & _ 
    	Session("SESSIONSTATEUsagecookieless001_FavoriteNumBER") & ControlChars.Crlf)
      end if
       'Debug output for manual test      
       Response.Write ("Retrieving items into Session State" & ControlChars.Crlf)
       Response.Write ("SessionID: " & Session.SessionID & ControlChars.Crlf)
       Response.Write ("IsNewSession: " & Session.IsNewSession & ControlChars.Crlf)
       Response.Write ("IsCookieless: " & Session.IsCookieless & ControlChars.Crlf)
       Response.Write ("Timeout: " & Session.Timeout & ControlChars.Crlf)
       Response.Write ("Name: " & Session("SessionStateUsageCookieless001_Name") & _
       ControlChars.Crlf)
       Response.Write ("City: " & Session("SessionStateUsageCookieless001_City") & _
       ControlChars.Crlf)
       Response.Write ("State: " & Session("SessionStateUsageCookieless001_State") & _
       ControlChars.Crlf)
       Response.Write ("FavoriteNum: " & Session("SessionStateUsageCookieless001_FavoriteNumber") & _
       ControlChars.Crlf)
    end if
       
    Response.write ("<p>XSP Test Case Finished</P>" & ControlChars.Crlf & "</BODY>" & _ 
    ControlChars.Crlf & "</HTML>" & ControlChars.Crlf)
    %>
    
  5. Save the file as SessionStateUsageCookieless001.aspx.

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

    NoteSessionStateUsageCookieless001.htm is a placeholder for the name of the file.
  8. Create another .aspx file. To do this, follow these steps:
    1. Paste the following code in Notepad:
      <%
      ' --------------------------------------------------------------------------------------
      
      ' Browse from ASPX to HTM to ASPX - Session should still be available in 2nd aspx
      ' --------------------------------------------------------------------------------------
      Response.write ("Hello World")
      
      %>
      
    2. Save the file as Hello.aspx.

      NoteHello.aspx is a placeholder for the name of the file.
  9. Create a virtual directory in IIS.
  10. Map the virtual directory that you created in step 9 to your local folder MyFolder.
  11. In Microsoft Internet Explorer, type the following URL in the address bar:
    http://WebServerName/VirtualDirectoryName/SessionStateUsageCookieless001.aspx.
    Note The session ID is embedded in the path of the URL, and the URL in Internet Explorer appears as the following:
    http://WebserverName/VirtualDirectoryName/(SessionID)/SessionStateUsageCookieless001.aspx
  12. In the URL, change the file name to SessionStateUsageCookieless001.htm. Do not changed the sessionID that is embedded in the URL. Notice that this page retrieval is not successful.
  13. In the URL, change the file name to Hello.aspx. This leaves the session ID that is embedded in the URL unchanged. Notice that this page is retrieved without fail.

↑ Back to the top


References

For more information, visit the following Microsoft Developer Network (MSDN) Web sites:

↑ Back to the top


Keywords: KB834488, kbbug, kbcookie, kbwebserver, kbpending

↑ Back to the top

Article Info
Article ID : 834488
Revision : 6
Created on : 5/17/2007
Published on : 5/17/2007
Exists online : False
Views : 400