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
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
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
To resolve this problem, manually add the Microsoft .NET
Framework 1.1 filter in IIS. To do this, follow these steps:
Open IIS
- Click Start, point to
Settings, and then click Control
Panel.
- Click Administrative Tools, and then
double-click Internet Service Manager. Internet
Information Services opens.
- 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
- In IIS, click Default Web Site.
- On the Action menu, click
Properties. The Default Web Site Properties
dialog box appears.
- Click the ISAPI filters tab.
- Click Add. The Filter
Properties dialog box appears.
- Type .aspx in the Filter
Name box.
- Click Browse.
- 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
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
↑ Back to the top
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:\MyFolder.
Note MyFolder 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 ("<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)
%>
- Save the file as
SessionStateUsageCookieless001.aspx.
NoteSessionStateUsageCookieless001.aspx
is a placeholder for the name of the file. - 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>
- Save the file as
SessionStateUsageCookieless001.htm.
NoteSessionStateUsageCookieless001.htm
is a placeholder for the name of the file. - Create another .aspx file. To do this, follow these steps:
- 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")
%>
- Save the file as
Hello.aspx.
NoteHello.aspx is a
placeholder for the name of the file.
- Create a virtual directory in IIS.
- Map the virtual directory that you created in step 9 to
your local folder MyFolder.
- 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
- 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.
- 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
For more information, visit the following Microsoft
Developer Network (MSDN) Web sites:
↑ Back to the top