protected void Page_Error(object sender, EventArgs e)
{
try
{
Response.Write(Server.GetLastError().Message);
}
finally
{
Server.ClearError();
}
}
Global.asax ta hata yakalama:
protected void Application_Error(object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
Exception objErr = Server.GetLastError().GetBaseException();
string err = "Error in: " + Request.Url.ToString() +
". Error Message:" + objErr.Message.ToString();
}
Hiç yorum yok:
Yorum Gönder