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.

Why is my ASP.NET application restarting?


View products that this article applies to.

Introduction

Welcome back! This month's topic is how to use the Microsoft Knowledge Base (KB) to find information about scenarios where a Microsoft ASP.NET (included with the Microsoft .NET Framework) application restarts. Some readers asked about this topic, and it is also a frequent topic in the forums on the Microsoft ASP.NET Web site. To view these forums, visit the following Microsoft Web site: It can be confusing to deal with symptoms that are related to an application that is restarting if you do not know what is going on or why. In general, an application restarts for valid reasons, but situations do exist where an application may restart frequently and cause issues for your ASP.NET applications.

Because the goal of this column is to demonstrate how developers can use the KB, this column includes a typical troubleshooting scenario that is related to this topic. While this list is not intended to be a comprehensive list of scenarios, the behavior that is related to the application restarting may present itself in the following ways:
  • Session variables (inProc mode) are intermittently lost.
  • Application state variables are lost.
  • Cache data is lost.
  • The Application_Start event and the Application_End event seem to start unexpectedly.

↑ Back to the top


Sample search scenario: Session state variables are lost

The first KB query is for a scenario where session state variables are lost for an application. Start by specifying that you want developer-related articles to be returned in your search. To do this, use the kbAudDeveloper keyword to set the audience for the article. Next, add the appropriate ASP.NET keyword. For this search, use the kbASPNETSearch keyword to limit your results to articles that are related to ASP.NET. The following list includes the ASP.NET version keywords:
  • The kbASPNetSearch keyword refers to all the versions of ASP.NET.
  • The kbASPNet100 keyword refers to the version of ASP.NET 1.0 that is included with the .NET Framework 1.0.
  • The kbASPNet110 keyword refers to the version of ASP.NET 1.1 that is included with the .NET Framework 1.1.
In this scenario, session state variables are lost in your application, so you must add the kbState keyword. This keyword is used for articles that describe state management issues, such as application state issues, session state issues, view state issues, and other issues. If you read last month's column "Tracking down view state issues in the Knowledge Base," you are already familiar with this keyword.

In this scenario, the behavior that you are seeing is related to a perceived problem with ASP.NET. Therefore, you are not interested in general informational content or how-to content, and you can narrow your results appropriately. To do this, use the kbPrb keyword. The kbPrb keyword signifies a perceived problem. If you suspect that the behavior is an actual flaw in ASP.NET, use the kbBug keyword. The following list contains brief descriptions of the most common article types:
  • kbPrb: These articles describe perceived problems in the product. In other words, the user experiences a problem with the product, but it is not a bug.
  • kbInfo: These articles describe a concept or provide additional information about an issue.
  • kbHowToMaster: These articles are how-to articles. These articles contain a step-by-step explanation of how to perform a specific task.
  • kbQFE: These articles are hotfix articles. These articles describe a problem that has an available fix. However, the fix may not be fully tested and is not yet available in a service pack release.
  • kbBug: These articles describe a specific bug in a product.
Until now, you have only provided the generic classification for the articles that you want to include in your search. In our example, we are looking for information about a specific scenario. To make your search more precise, add the following query words:
  • session
  • variable
  • lost
This addition uses the ability to perform a full-text search. The final query is kbAudDeveloper kbASPNETSearch kbState kbPrb session variable lost.

Try this query in the KB search tool at Microsoft Help and Support. To view Microsoft Help and Support, visit the following Microsoft Web site: When you try this query, you should get a focused result. Make sure that you click All of the words entered and Full Text when you run your search. At the time of this column's writing, this query produced the following articles:
  • 324772 Session data is lost when you use ASP.NET InProc session state mode
  • 316148 Session variables are lost intermittently in ASP.NET applications
Both articles in the result set describe the possible issue with the ASP.NET application restarting. This issue then causes the session state data to be lost when it is stored in-process. Article 316148 describes one of the most common causes of an application restarting frequently in this scenario: antivirus software scanning the files of your ASP.NET application. More specifically, the application restarts may occur in some situations because antivirus software is scanning the Web.config file in the root of the application, the Machine.config file, the Bin folder, or the Global.asax file.

Additional search queries

If you already know that the session data is lost because of an application that is restarting frequently, you might search the KB from a different perspective. In this case, use kbAudDeveloper kbASPNETSearch kbPrb kbHttpRuntime application restart to search for the lower-level issue:

Note that the kbHttpRuntime keyword is added to this query. This keyword specifies that you expect the core problem to be related to an issue with the run-time services that are used to carry out the request. The application and restart query words take advantage of the full text search the same way that the session state query in the "Sample search scenario: session state variables are lost" section of this column does. The following queries demonstrate how to use some of the other keywords to search for related issues:
  • kbAudDeveloper kbASPNETSearch kbPrb application restart
  • kbAudDeveloper kbASPNETSearch kbHttpRuntime kbBug Application restart>
  • kbAudDeveloper kbASPNETSearch kbBug antivirus
  • kbAudDeveloper kbASPNET100 kbBug antivirus
  • kbAudDeveloper kbASPNET110 kbBug antivirus
Note These queries assume that you will click All of the words entered and Full Text in the KB. To access the KB, visit the following Microsoft Web site: If you have never read the forums on the Microsoft ASP.NET Web site, visit the following Microsoft Web site: These forums can save you a lot of time, and many of the people who are responsible for the information that is included in the KB visit these forums to determine what issues their customers are facing. For example, a thread that is posted in the FAQ section describes issues that are related to this month's topic. To read the forums, visit the following Microsoft Web site: If you read any of the previous columns, you are familiar with the format. If not, you may want to view the following "General search tips" section. Each installment of this column ends with a list of general search tips. Hopefully this information helps you use the KB more productively.

↑ Back to the top


General search tips

When KB articles are created, they have specific product elements and keywords that are associated with them. If you know the keywords that are associated with a product or a technology, use those instead of the more generic English terms during your initial searches. This typically offers a bit more precision than just stringing together words or phrases. The following is a list of tips that should help improve your experience with the KB. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
303992 Keywords to search .NET related Knowledge Base articles
  • When you visit the Microsoft Help and Support Web site, click Search the Knowledge Base, and then try to limit your search by selecting the most relevant product. For example, click "ASP.NET" and not "Visual Studio .NET" or "All Products."
  • When you search the KB, you can narrow down the types of articles that are returned by including the kbAudDeveloper keyword. This keyword filters your search to only include developer-related content so that you do not have an article about troubleshooting Microsoft Bob issues and articles about COM Interop and ASP.NET.
  • The following list includes general ASP.NET-related technology keywords:
    • Caching: kbCaching
    • Configuration: kbConfig
    • Connectivity: kbConnectivity
    • State Management: kbState
    • Cookies: kbCookie
    • DataBinding: kbDataBinding
    • Debugging: kbDebug
    • Deployment: kbDeployment
    • HttpRuntime: kbHttpRuntime
    • Migration: kbMigration
    • Page/Web Form: kbWebForms
    • Server Controls: kbservercontrols
    • Validation: kbValidation
    • Security: kbSecurity
  • If your issue applies to Visual Studio .NET directly, you can include some of the following keywords:
    • kbVSNET2002Ac: Visual Studio .NET 2002 Academic Edition
    • kbVSNET2002EntArch: Visual Studio .NET 2002 Enterprise Architect Edition
    • kbVSNET2002EntDev: Visual Studio .NET 2002 Enterprise Developer Edition
    • kbVSNET2002Pro: Visual Studio .NET 2002 Professional Edition
    • kbVSNET2002Search: Visual Studio .NET 2002
    • kbVSNET2003Ac: Visual Studio .NET 2003 Academic Edition
    • kbVSNET2003EntArc: Visual Studio .NET 2003 Enterprise Architect Edition
    • kbVSNET2003EntDev: Visual Studio .NET 2003 Enterprise Developer Edition
    • kbVSNET2003Pro: Visual Studio .NET 2003 Professional Edition
    • kbVSNET2003Search: Visual Studio .NET 2003
    • kbVSNETSearch: Visual Studio .NET
    • kbVSsearch: Visual Studio
    • kbIDE: Applies to issues with Visual Studio .NET integrated development environment (IDE)
Until next time,
Jeremy Osborne, MCSD
Technical Writer, Microsoft Developer Support

Jeremy Osborne is a technical writer for the Developer Support Content Team and has been working with ASP .NET and the .NET Framework since joining the team during the early beta period of .NET Framework 1.0. Before joining his current team, he served as a member of the ASP Developer Support Group in Microsoft Product Support Services.

↑ Back to the top


Keywords: KB871042, kbinfo

↑ Back to the top

Article Info
Article ID : 871042
Revision : 5
Created on : 2/26/2007
Published on : 2/26/2007
Exists online : False
Views : 591