-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UseElmahExceptionPage under IIS sub-application #152
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It appears that the Elmah Exception Page does not work properly while running under an IIS sub application.
Assume running an app under IIS and the "/" application is not running MVC. But an mvc6 application is deployed to "/mvc6". Using the default options for
Services.AddElmah()
andapp.UseElmahExceptionPage()
works fine while accessing the error page (i.e. "/mvc/elmah"). But, when an exception occurs, the redirect url is "/elmah/detail/{guid}", which is to the root application.Updating the ElmahOptions.Path to various values does not resolve the issue.
"elmah"
Same behavior as not setting
Elmah error page works at "/mvc6/elmah"
Elmah redirect is to "/elmah/detail/{guid}" and is a 404
If I modify the error redirect to "/mvc6/elmah/detail/{guid}", the error page displays
The detail page incorrectly updates the URL. If the exception occured on "/mvc6/controller/action", the url becomes "/controller/action". (This appears to be a
.pushState()
and not a redirect.)"~/elmah"
Elmah error page does not work
Elmah redirect is to
~/elmah/detail/{guid}
(the ~ is not translated)"/mvc6/elmah"
Elmah error page works at
/mvc6/mvc6/elmah
Elmah redirect is to
/mvc6/elmah/detail/{guid}
and is a 404A possible fix is to modify
ErrorLogMiddleware.InvokeAsync(HttpContext context)
to and replace "~/" withHttpContext.Request.PathBase
.The text was updated successfully, but these errors were encountered: