SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating an application that changes the authentication type to Claims based, but I'm trying not to use powershell. any advice?

share|improve this question
up vote 2 down vote accepted

To simply change application to Claims authentication from code you can use:

SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://testwebapp/"));
webApp.UseClaimsAuthentication = true;

But my suggestion is that you use PowerShell or Central Administration to setup Claims.

share|improve this answer

You can do the following steps:

  1. Open Central Administration.
  2. Click Application Management > Manage web application
  3. Select your Web application and then click Authentication provider.
  4. Click Default link and then configure your authentication.
share|improve this answer
sorry, I said in code – Bassel Alkhateeb Jul 23 '11 at 18:33
Also, this is not correct. You cannot currently change from classic -> claims using Central Admin. Give it a try on a VM! – Benjamin J Athawes Jul 23 '11 at 20:43
I'm sorry but I saw that your title didn't include "in code" before :-). @Ben: good comment, mate ;-). – Thuan Jul 24 '11 at 1:18

Your Answer


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

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