J
jobs
Hello.
I've got a customerrors section in my web.config that redirects all
errors to an ErrorPage.aspx
<customErrors defaultRedirect="~/ErrorPage.aspx">
<error statusCode="403" redirect="~/NoAccess.htm"/>
<error statusCode="404" redirect="~/FileNotFound.htm"/>
</customErrors>
</system.web>
Is there any way for me to get the page that errored and the error
from the ErrorPage.aspx?
I've tried Request.ServerVariables("HTTP_REFERRER") and
Server.GetLastError().InnerException to no avail.Both are either null
or blank everytime.
Dim ErrorDetail As String = ""
If Not Server.GetLastError Is Nothing Then
ErrorDetail =
Server.GetLastError().InnerException.ToString
End If
Dim page As String =
Request.ServerVariables("HTTP_REFERRER")
Thanks for any help or information.
I've got a customerrors section in my web.config that redirects all
errors to an ErrorPage.aspx
<customErrors defaultRedirect="~/ErrorPage.aspx">
<error statusCode="403" redirect="~/NoAccess.htm"/>
<error statusCode="404" redirect="~/FileNotFound.htm"/>
</customErrors>
</system.web>
Is there any way for me to get the page that errored and the error
from the ErrorPage.aspx?
I've tried Request.ServerVariables("HTTP_REFERRER") and
Server.GetLastError().InnerException to no avail.Both are either null
or blank everytime.
Dim ErrorDetail As String = ""
If Not Server.GetLastError Is Nothing Then
ErrorDetail =
Server.GetLastError().InnerException.ToString
End If
Dim page As String =
Request.ServerVariables("HTTP_REFERRER")
Thanks for any help or information.