Microsoft Knowledge Base Email Alertz

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

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 2.0 Web Hosting with SQL 2005: Click Here!
Discount ASP.NET Hosting


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




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

Retired KB ArticleThis 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.
Article ID:937095
Last Review:June 21, 2007
Revision:1.1
On This Page

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.

Back to the top

Method 1

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

Back to the top

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:
http://msdn2.microsoft.com/en-us/library/2027ewzw.aspx (http://msdn2.microsoft.com/en-us/library/2027ewzw.aspx)

Back to the top


APPLIES TO
•Microsoft ASP.NET 2.0

Back to the top

Keywords: 
kbinfo kbasp kbfix kbtshoot kbprb KB937095

Back to the top

       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

John - http://www.dotnetsync.com Report As Irrelevant  
Written: 4/17/2008 7:06 AM
Guys I am having difficulty deploying my application to web server ...first I was getting the error Web Server not available...once I deleted the precompiled.config file it's gone and now I am getting an error that global.asax file resides in two different folders in ASP.NET Temp files ...deleted both folders but still getting this error any help is appreciated.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please