M
MattC
When a System.ArgumentOutOfRangeException is throw it gets caught in my Application_Error event. But I want it to be dealt with and then passed to a specific page. I dont want to use redirect becuase i want the Server info that gets picked up by Error.aspx page. Instead of transferring it displays the old yellow and white Server error page.
protected void Application_Error(Object sender, EventArgs e)
{
System.Diagnostics.EventLog myLog = new System.Diagnostics.EventLog(); //Create a new EventLog object
myLog.Source = Convert.ToString(ConfigurationSettings.AppSettings["eventlogname"]); //Set the name of the Log
myLog.WriteEntry(_message, System.Diagnostics.EventLogEntryType.Error);//Write the log
Server.Transfer("Error.aspx"); <---does not transfer to my page here
}
<customErrors mode="RemoteOnly" />
thanx in advance
MattC
protected void Application_Error(Object sender, EventArgs e)
{
System.Diagnostics.EventLog myLog = new System.Diagnostics.EventLog(); //Create a new EventLog object
myLog.Source = Convert.ToString(ConfigurationSettings.AppSettings["eventlogname"]); //Set the name of the Log
myLog.WriteEntry(_message, System.Diagnostics.EventLogEntryType.Error);//Write the log
Server.Transfer("Error.aspx"); <---does not transfer to my page here
}
<customErrors mode="RemoteOnly" />
thanx in advance
MattC