1

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" />
Issa Fram
  • 2,556
  • 7
  • 33
  • 63
  • I dropped your configuration into my web.config and my elmah continued to function normally. As an experiment, try setting the elmah.mvc.route to a route you know you can successfully access and see what happens. – Grax32 Aug 04 '14 at 14:11
  • 1
    @Grax thx for helping. I will answer / close my own question. But I figured out the issue after trying many many things. It turns out that `elmah.mvc.allowedUsers` is actually case sensitive when it shouldn't be. I will submit a change to GitHub. Hopefully that will be merged in at some point. – Issa Fram Aug 04 '14 at 14:14

1 Answers1

1

Any one still looking, in the latest elmah nuget package there is a new setting for username case sensitivity.

<add key="elmah.mvc.UserAuthCaseSensitive" value="false" />
Ricky Gummadi
  • 4,559
  • 2
  • 41
  • 67