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.

The Global.asax file does not raise events in an ASP.NET 2.0 application


View products that this article applies to.

Symptoms

The Global.asax file does not raise events in a Microsoft ASP.NET 2.0 application. Additionally, the App_global.asax.dll file is not generated in the temporary ASP.NET folder.

↑ Back to the top


Cause

This behavior occurs because the Global.asax file is not precompiled.

↑ Back to the top


Resolution

To resolve this behavior, use one of the following methods.

Method 1

Delete the Global.asax file from the ASP.NET 2.0 application root directory.

Method 2

Compile the ASP.NET 2.0 application.

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


More information

The ASP.NET 2.0 application root directory contains a file that is named the PreCompiledApp.config file. The PreCompiledApp.config file tracks the deployment of an application, and the PreCompiledApp.config file informs ASP.NET 2.0 if ASP.NET 2.0 must compile any files at request time. The standard contents of the PreCompiledApp.config file are as follows.
<precompiledApp version="2" updatable="true"/>
The updatable attribute that is set to the true value applies to ASP.NET pages (.aspx files) and to user controls (.ascx files). The value does not apply to ASP.NET 2.0 application files (.asax files). Therefore, the Global.asax file is compiled, and the Global.asax file is not updatable.

↑ Back to the top


References

For more information about the Global.asax file, visit the following Microsoft Developer Network (MSDN) Web site:

↑ Back to the top


Properties

Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.

↑ Back to the top


Keywords: KB937095, kbprb, kbtshoot, kbfix, kbasp, kbinfo

↑ Back to the top

Article Info
Article ID : 937095
Revision : 2
Created on : 6/21/2007
Published on : 6/21/2007
Exists online : False
Views : 683