Microsoft KB Archive/827189

From BetaArchive Wiki

Article ID: 827189

Article Last Modified on 4/18/2007



APPLIES TO

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




SYMPTOMS

You install the Microsoft .NET Framework 1.1, and then you install the .NET Framework 1.0 Service Pack 2 (SP2) on a computer that is running Microsoft Windows 2000 with Service Pack 4 (SP4). When you try to run a Microsoft ASP.NET application, you may receive the following error message:

Could not start the ASP.NET State Service service on Local Computer.
Error 1069: The service did not start due to a logon failure.

CAUSE

When the .NET Framework 1.0 is installed after the .NET Framework 1.1 is installed, the password changes for the ASPNET account that the ASP.NET state service uses. Therefore, an error occurs when the ASP.NET application uses the ASP.NET state service.

WORKAROUND

When you install the .NET Framework version 1.0 after you install the .NET Framework version 1.1, you may modify the password for the ASPNET account that the ASP.NET state service uses. To do this, locate the %windir%\Microsoft.NET\Framework\v1.1.4322 folder at the command prompt, and then type the following command:

aspnet_regiis.exe -ir


STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce the Behavior

Install Windows 2000 SP4

If Windows 2000 SP4 is not already installed on your Windows 2000-based computer, visit the following Microsoft Web site:

Install the .NET Framework 1.1

To download and to install the .NET Framework 1.1, visit the following Microsoft Web site:

Create a New ASP.NET Web Application

  1. Create a new ASP.NET Web application by using Microsoft Visual C# .NET or Microsoft Visual Basic .NET. Name the project StateServApp. By default, WebForm1.aspx is created.
  2. Add a TextBox control and two Button controls to WebForm1.aspx.
  3. Add the following code to the Button_click event of the Button1 control:

    Visual C# .NET

    Session["var1"]=TextBox1.Text;       

    Visual Basic .NET

    Session("var1")=TextBox1.Text      
  4. Add the following code to the Button_click event of the Button2 control:

    Visual C# .NET

    Response.Write("Value retrieved from the Session Variable: " + Session["var1"])

    Visual Basic .NET

    Response.Write("Value retrieved from the Session Variable: " + Session("var1"))

Configure the State Service

By default, ASP.NET stores the session state in the same process that processes the request. Additionally, ASP.NET stores the session data in an external process such as aspnet_state. To enable this feature, follow these steps:

  1. In Solution Explorer, double-click the Web.config file to edit the file.
  2. Set the mode attribute of the <sessionState> section to StateServer, and then configure the stateConnectionString attribute with the following values of the computer where you started aspnet_state:

    <configuration>
     <system.web>
      <sessionState   mode="StateServer"
        stateConnectionString="tcpip=localhost:42424"
      />
     </system.web>
    </configuration>

    Note If the state service is running on the remote computer, type the remote computer name instead of localhost.

  3. Save and then close the Web.config file.
  4. On the Build menu in Microsoft Visual Studio, click Build Solution.
  5. To start the ASP.NET State Service, follow these steps:
    1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
    2. In the right pane of the Services window, right-click the ASP.NET State Service service, and then click Start.
  6. To run the ASP.NET application, follow these steps:
    1. In a Web browser, type the following URL:

      http://localhost/StateServ/WebForm1.aspx

    2. In the box, type This text is from the session variable.
    3. To assign the text in the box to the session variable, click the Button1 control.
    4. To display the text that is stored in the session variable, click the Button2 control.
  7. To stop the ASP.NET State Service, follow these steps:
    1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
    2. In the right pane of the Services window, right-click the ASP.NET State Service service, and then click Stop.

Install the .NET Framework 1.0 SP2

To download and to install the .NET Framework 1.0 SP2, visit the following Microsoft Web site:

Start the State Service

To start the ASP.NET State Service, follow these steps:

  1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
  2. In the right pane of the Services window, right-click the ASP.NET State Service service, and then click Start.

You receive the error message that is mentioned in the "Symptoms" section of this article.

REFERENCES

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

307598 INFO: ASP.NET State Management Overview




For more information, visit the following Microsoft Web sites:

Keywords: kbstate kbweb kbconfig kbprb KB827189