I have an asp.net application and a SharePoint application which uses windows authentication and are on the same domain. From the asp.net application, I am making some managed client OM calls to the SharePoint site.

When I deploy the asp.net site to IIS with one of the OOB application pools, the site gives a 401 error on pages where the client OM is used. Creating a new app pool account with a user who has access to the SharePoint site works great - no errors.

Since both of the sites are windows auth and on the same domain, how can I make a request to SharePoint under current user's context instead of the app pool identity?

Any help with this will be greatly appreciated.


1 Answer 1


You'd have to turn on impersonate in the webapp. This way requests done to underlying systems are done using the currently logged in user's identity. This works on local machines only though and is thread specific. To send the current user's identity to other systems, delegation is also required:

ASP.NET Impersonation & Delegation


The Client OM and auth.


Sending credentials in code:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.