Help and Support
 

powered byLive Search

PRB: "Could Not Start the ASP.NET State Service on Local Computer" Error Message When You Try to Run an ASP.NET Application with the ASP.NET State Service

Article ID:827189
Last Review:April 18, 2007
Revision:5.3
On This Page

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.

Back to the top

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.

Back to the top

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

Back to the top

STATUS

This behavior is by design.

Back to the top

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:
http://www.microsoft.com/downloads/details.aspx?FamilyID=1001aaf1-749f-49f4-8010-297bd6ca33a0&DisplayLang=en (http://www.microsoft.com/downloads/details.aspx?FamilyID=1001aaf1-749f-49f4-8010-297bd6ca33a0&DisplayLang=en)

Install the .NET Framework 1.1

To download and to install the .NET Framework 1.1, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx (http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx)

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:
a. Click Start, point to Programs, point to Administrative Tools, and then click Services.
b. 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:
a. In a Web browser, type the following URL:
http://localhost/StateServ/WebForm1.aspx
b. In the box, type This text is from the session variable.
c. To assign the text in the box to the session variable, click the Button1 control.
d. 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:
a. Click Start, point to Programs, point to Administrative Tools, and then click Services.
b. 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:
http://msdn2.microsoft.com/en-us/netframework/aa569282.aspx (http://msdn2.microsoft.com/en-us/netframework/aa569282.aspx)

Start the State Service

To start the ASP.NET State Service, follow these steps:
a. Click Start, point to Programs, point to Administrative Tools, and then click Services.
b. 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.

Back to the top

REFERENCES

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
307598 (http://support.microsoft.com/kb/307598/) INFO: ASP.NET State Management Overview


For more information, visit the following Microsoft Web sites:
http://www.microsoft.com/downloads/details.aspx?FamilyID=1001aaf1-749f-49f4-8010-297bd6ca33a0&DisplayLang=en (http://www.microsoft.com/downloads/details.aspx?FamilyID=1001aaf1-749f-49f4-8010-297bd6ca33a0&DisplayLang=en)

http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx (http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx)

http://msdn2.microsoft.com/en-us/library/87069683(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/87069683(vs.71).aspx)

Back to the top


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

Back to the top

Keywords: 
kbstate kbweb kbconfig kbprb KB827189

Back to the top

Article Translations

 

Related Support Centers

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.