I am creating an MVC4 site using .NET 4.0, IIS 7+. It is internal so I am using Windows Authentication. I have decided to use ELMAH , and since this is MVC I have decided to use the Elmah.MVC NuGet package.
Logging exceptions works. I have it setup to log to the App_Data folder and to also send emails. It does both of these things just fine.
But I wanted to use the UI to actually look at all the errors. So I browse to site.com/elmah and the site pops up with a request for my credentials. This is confusing to me since it should be using Windows Authentication and I should be on the list of users already. The rest of my application uses the HttpContext.Current.User
correctly from the visiting user so I am confused how /elmah is not working correctly.
The site's Application Pool is set to NetworkService and the site itself is set to connect using Pass-through authentication .
What would I be missing exactly?
Here are my elmah.mvc appSettings:
<add key="elmah.mvc.disableHandler" value="false" />
<add key="elmah.mvc.disableHandleErrorFilter" value="false" />
<add key="elmah.mvc.requiresAuthentication" value="true" />
<add key="elmah.mvc.IgnoreDefaultRoute" value="false" />
<add key="elmah.mvc.allowedRoles" value="*" />
<add key="elmah.mvc.allowedUsers" value="DOMAIN\user1,DOMAIN\user2" />
<add key="elmah.mvc.route" value="elmah" />
仍在寻找的任何人,在最新的elmah nuget软件包中,都对用户名区分大小写进行了新设置。
<add key="elmah.mvc.UserAuthCaseSensitive" value="false" />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.