1

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

2 Answers 2

2

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

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

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

-3

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.
3
  • sorry, I said in code Jul 23, 2011 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! Jul 23, 2011 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, 2011 at 1:18

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.