ANAT2403
asked on
application error in global.asax
In AS{.NET 2.0 with C# I have an errorpage and in global.asax I added to Application_Error to print the error in an errorpage I defined.
I have some problems:
first I have to run the application in the mode without debugging otherwise it get to the application error all the time.
second if I run without the debugging not all the errors are catched.
How does tthis function work?
I have some problems:
first I have to run the application in the mode without debugging otherwise it get to the application error all the time.
second if I run without the debugging not all the errors are catched.
How does tthis function work?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi nisarkhan,
What do you mean by
if (ex != null)
{
//
}
where ex comes from?
Anat
What do you mean by
if (ex != null)
{
//
}
where ex comes from?
Anat
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
What is the difference and what is prefered between
System.Web.HttpContext.Cur rent.Respo nse.Redire ct("ErrorP age.aspx") ;
and
Server.Transfer("~/ErrorPa ge.aspx", true);
Thankyou
Anat
What is the difference and what is prefered between
System.Web.HttpContext.Cur
and
Server.Transfer("~/ErrorPa
Thankyou
Anat
the diff is response.rediect vs server.transfer
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=15
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=15
{
try
{
Server.Transfer("~/Excepti
}
catch { ;}
}
and in exceptionpage.aspx.cs page_load
if (ex != null)
{
//
}