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'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
add comment

2 Answers

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;
webApp.Update();

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

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.