Accessing Elmah.axd with SqlErrorLog in SharePoint without adding user to db
Posted
by Chloraphil
on Stack Overflow
See other posts from Stack Overflow
or by Chloraphil
Published on 2010-01-15T17:43:02Z
Indexed on
2010/04/15
15:13 UTC
Read the original article
Hit count: 747
I have installed/configured Elmah on my personal SharePoint dev environment and everything works great since I'm logged in as admin, etc. I am using the MS Sql Server Error Log. (I am also using log4net to handle DEBUG/INFO/etc level logging and log statements are also stored in the db, in the same table as ELMAH's.)
However, on the actual dev server (not my personal environment), when I access http://example/elmah.axd I get the error "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'". I understand that this is the traditional error for the "double-hop problem" but I don't even want my credentials to be passed along - I would just like the database access to be made with the credentials of the Application Pool Identity. When using the SP object model the SPSecurity.RunWithElevatedPrivileges is available; however, I do not want to modify the Elmah source.
My production environment precludes the use of SQL Server authentication, changing impersonation to false, or giving myself permissions on the db directly.
How can I get this to work? Am I missing something?
© Stack Overflow or respective owner