I know this has been asked a lot of times, but I could not get things working from those posts.
I have implemented Application_error method in Global.asax file to log and send email for all unhandled exceptions. This works perfectly fine when running on Visual Studio, but as soon as I publish it to the test server, the Application_event stops firing. No log entry is made to the text file and no email is sent.
PrecompiledApp.config file is present in the root directory, along with App_global.asax.compiled, App_global.asax.dll in the bin folder. Global.asax file is not present after I publish the website.
I have tried removing PrecompiledApp.config file, but it doesn't work. I have tried adding Global.asax file to the root directory, but doesn't work. I have tried with
and
in web.config file....nothing works.
I added a line to Page_load of a page:
It returns ApplicationInstance: ASP.global_asax, which should be returned according to a post. Then why is the event not firing?
Please Help!!!
Thanks!!!
I have implemented Application_error method in Global.asax file to log and send email for all unhandled exceptions. This works perfectly fine when running on Visual Studio, but as soon as I publish it to the test server, the Application_event stops firing. No log entry is made to the text file and no email is sent.
PrecompiledApp.config file is present in the root directory, along with App_global.asax.compiled, App_global.asax.dll in the bin folder. Global.asax file is not present after I publish the website.
I have tried removing PrecompiledApp.config file, but it doesn't work. I have tried adding Global.asax file to the root directory, but doesn't work. I have tried with
Code:
<customErrors mode="Off" />
and
Code:
<customErrors mode="On" defaultRedirect="Error Page.aspx" />
in web.config file....nothing works.
I added a line to Page_load of a page:
Code:
Response.Write("<br/>ApplicationInstance: " + Context.ApplicationInstance.GetType().FullName);
It returns ApplicationInstance: ASP.global_asax, which should be returned according to a post. Then why is the event not firing?
Please Help!!!
Thanks!!!