Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am using SharePoint 2010 and we have switched to using Claims Based Authentication.

When I run unit tests and running code with elevated privileges the web.CurrentUser.LoginName is "MYDOMAIN\Administrator", and an Access Denied-error for the operation that requires the elevated privileges is thrown. (I am logged in on my computer as "MYDOMAIN\Administrator")

We are expecting "i:0#.w|MYDOMAIN\Administrator", because that is what we get when running from web page.

Does anyone have a solution for this problem?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.