Showing posts with label SharePoint 2010. Show all posts
Showing posts with label SharePoint 2010. Show all posts

Thursday, April 7, 2011

How to convert CMA (Classic Mode Authentication) to CBA (Claim Based Authentication)

You can convert a web application that has been configured to use CMA to use CBA using PowerShell only. Once you convert the web application to use CBA, you cannot revert to CMA. Using following PowerShell commands you can convert CMA to CBA

$ConvertApp = get-spwebapplication “http://<your web application name”
$ConvertApp.useclaimsauthentication = “True”
$ConvertApp.Update()

Tuesday, April 5, 2011

How to configure Form Based Authentication in SP2010

Setup of your SharePoint 2010 site

·   In Central Admin, create a new site. By default, this will use Windows Authentication. Since we haven’t setup FBA yet, we need to setup the Web Application first as a Windows site.
·   Create the Web Application
·   Create a default Site Collection, and make a windows user (below we’ve used the Administrator account) a Site Administrator.

Setup of your SharePoint User Database

·   Configure SQL for membership store
·   Create database
·   Create SQL User
·   Add SQL user to database
Configure SQL for membership store
·   Setup the ASP.NET Membership Database. Note: You can use custom membership stores, DotNetNuke, even Live! credentials. But the .NET membership database is very simple to setup. This requires the SQL Server database. You can use the integrated version that is supplied with SharePoint, Express or a fully featured SQL Server (Standard or Enterprise) Edition.
·   Find the setup file aspnet_regsql.exe located at either of the following locations depending upon your OS:
%windir%\Microsoft.NET\Framework\v2.0.5027
%windir%\Microsoft.NET\Framework64\v2.0.5027
·   When the ASP.NET SQL Server Setup Wizard appears, select “Configure SQL Server for application services” as mentioned in below image, then click Next
Create Database

·   Once you select to Configure SQL Server for application services, you will be prompted for the SQL Server name and database name.  You can choose an existing database to add the membership elements to, or you can type in a new name and the database will be created for you.

·   Above, I have named the database FBADB
·   Click Next and Finish

Create SQL User
As an administrator, you’ll be able to add and modify user accounts. But from the SharePoint
runtime, we’ll have to provide access to the membership store. This can be done in two ways. If
using SSPI (Integrated Security) for the connection string from SharePoint, you’ll need to determine
the Service Account that runs the Application Pool. Then you’ll provide access to this windows (or
service) account in SQL Server to the FBADB database. Or, if you don’t want to use SSPI, or don’t
want to take the time to figure out the startup service account for SharePoint you can simply create
a login to the FBADB database. Following are steps for the second approach.
  • Open SQL Server Management Studio (SSMS 2008) and select Security , then Logins
  • Right Click Logins and Select “New Login”
  • Create a SQL Server account. Below, we’d created the account FBAService with password as pw (you can use different  password )
  • Select “User Mapping”
  • Mark the checkbox next to FBADB, and select the row.
  • In “Database role membership”, make the user a db_owner

  • Click OK to save the new user.

Configure Central Admin Web Site to use SQL Membership Provider

 

SharePoint web sites out of the box are configured to use Active Directory.  So you may be wondering why we’re configuring Central Admin to use FBA when we don’t really want to login in as an FBA user. 
Well, we actually don’t want to configure it to to login as a forms user, but we do need to be able to add users from out membership database when configuring site collection administrators, and the like.

So all we want to do is tell the Central Admin web application to use our SQL membership provider as well as AD, so when you use the people picker to select users, it will provide results from our membership database.

Open IIS Manager on the WFE server (if more than one, then this needs to be done on every FWE that has Central Admin.  The same goes for the proceeding steps for the other web applications).
Select the SharePoint Central Administration v4 site.  On the Home Page, you’ll see many options for ASP.NET and IIS. 


  • Open the Connection Strings Page.  Under Actions menu on the right, select Add… to create a new connection string.  Provide the details for the membership database for the new connection string.
  • Enter the Server (.), Database (FBADB) and the Credentials for the user FBAService (by clicking the Set button). If you want to use SSPI, simpy select “Use Windows Integrated Security” instead.
  • Click OK to save
  • Click to Select the Server from the Connections pane again, and double click Providers.
  • On the Feature dropdown, select .NET Users. Your machine may take a while to respond while the configuration is read.
  • On the Actions menu, click Add..
  • On the Add Provider form, select SqlMembershipProvider as the Type
  • Provide a name: FBA.
  • Drop down ConnectionStringName and select FBADB

  • Ensure you provide “/” in ApplicationName, why we need this, see Scott Guthrie’s blog.
  • Then Click OK to save
  • From the Feature dropdown, select .NET Roles, then click Add.
  • Provide a name: FBARole, and select Type: SqlRoleProvider
  • Select the ConnectionStringName: FBADB

  • Ensure you provide “/” in ApplicationName, why we need this see Scott Guthrie’s blog.
  • Click OK to save the .NET role.
  • To verify that all looks ok, we can check the web.config of the web application.  to get to the right web.config, right-click on the web application under sites, and select Explore
  • In the web.config, you’ll see sections for the connection string and the providers.  The <roleManager> and <membership> sections should look like:
  • You should also see a <connectionStrings> section close to the bottom of the web.config file

Configure Secure Store Web Service to use SQL Membership Provider


Whatever exercise we did for Central Admin site, we are going to re-do for the SecurityTokenServiceAppliaation which is in the SharePoint Web Services application.


Redo all the steps as we did earlier for Central Admin
  • Create the connection string
  • Add the .NET role provider
  • Add the .NET users provider
  • Verify connection by editing config.xml

Setup the FBA Zone in SharePoint 2010

  • Browse to SharePoint 4.0 Central Administration, Select Security

  • In Application Security, select Specify Authentication Providers
  • Select the Web Application.
  • Click the Default Zone.

  • Ensure the Web Application is the correct one on the next page!
  • Change Authentication Type to Forms
  • Check Enable Anonymous (* note that this does not immediately enable Anonymous access; it merely makes the option available on the front-end web application *
  • Click Save.
Now we will have to configure IIS 7.0 for this FBA Web Site.


IIS 7.0 Web Site Configuration for SharePoint 2010 FBA Site

In IIS Manager, select the SharePoint site. In this example, we used the default site (80).  Double click the .NET Users icon
  • Click Set Default Provider from the actions pane on the left and select FBA
  • Click OK to save.
  • While we’re here, let’s add our first user. This will be used as an administrative account on the FBA site. Click Add..
  • Select a User, Email and Password. Depending upon parameters you defined earlier you may be prompted with challenge/response questions. (** The password may require some strength by default. If you receive an error message that states the “password is invalid”, simply add a number or non-alpha character.)
  • Next, select the SharePoint Central Administration v4 web site from the connections menu in IIS.
  • Click .Net Users, then in the Actions menu select “Set Default Provider” and set that to FBA.
  • Set the User as Site Administrator on the SharePoint 2010 Web Site
  • In SharePoint Central Admin v4, go to Application Management
  • In the Site Collections section, select “Change Site Collection Administrators”
  • On the next page, select the Site Collection we’ve been using.
  • You’ll note that the primary site collection administrator has a little red squiggly. Why? We don’t have Windows Authentication enabled for this site and therefore no way to resolve. Delete the Administrator account.
  • In the field type the user created above (we used fbaadmin), then click the Check Names button. You should see a black underline noting that the name was resolved.

Now let’s test all this by trying to login.  Browse to your site and select to login as a forms user login popup.

Login with the fbaadmin credentials and you should be able to access the site.



Access Denied  Error Troubleshooting
If you get access denied error after entering the username and password, that means you are authenticated OK, but not allowing in the web site even thought you are site collection administrator.

Resolution
In order for you to use IIS Manager to manage your SQL users, you need to set the default provider to our Forms provider, i.e. FBA.  In order for it to work we need to set it to the SharePoint claims provider.  Go back to .NET Users and reset the default provider to “i” which is for the Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider.


You should also check the default Role Provider for the web application and ensure that is set to “c”.  If this is set to the SQL provider that you created, you will get an unexpected error after you logon.

OR

You can also following same procedure using powershell script. My friend Vinay Bhatia explained in his blog "Access Denied" for FBA User with Site Collection Administrator privileges in SharePoint 2010.

Thursday, April 22, 2010

Troublshooting SharePoint 2010 Installation Issue

During Configuration Wizard, in step 2 you normally got one of these errors

An exception of type System.IO.FileNotFoundException was thrown. Additional exception information: Could not load file or assembly ‘Microsoft.IdentityModel, Version 3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified.

-OR-

An exception oftype Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: Failed to call GetTypes on assembly Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Could not load file or assembly ‘System.Web.DataVisualition, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find thefile specified.

-OR-

Failed to create the configuration database.

An exception of the type Microsoft.SharePoint.SPException was thrown. Additional exception information: User cannot be found

If you got following error



An exception of type System.IO.FileNotFoundException was thrown. Additional exception information: Could not load file or assembly ‘Microsoft.IdentityModel, Version 3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified.
 
Click on Finish.
 
Normally this problem occured because of Windows Identity Foundation pack was not installed. This can be fixed here: http://www.microsoft.com/downloads/details.aspx?FamilyID=eb9c345f-e830-40b8-a5fe-ae7a864c4d76&displaylang=en#filelist . Install this Identiry Foundation Pack and re-run the wizard again.
 
If you got following error
 
 
 
An exception oftype Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: Failed to call GetTypes on assembly Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Could not load file or assembly ‘System.Web.DataVisualition, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find thefile specified.


Click Finish.

This problem occured becuase Chart Controls cannot be found or not installed, download it from here: http://go.microsoft.com/fwlink/?LinkID=122517

After installitig this chart control, re-run the wizard, you installation will run smoothly.

Wednesday, April 21, 2010

How to Install SharePoint 2010 on Windows 7

SharePoint 2010 (Foundation/Server) allows you to install it on windows 7 as single server environment for development purpose. Now whenever you try to install it, it gives you error "Setup is unable to proceed due to the following error(s): This product requires Windows Server 2008 (x64). Correct the issue(s) listed above and re-run setup.". To get rid this error and install SharePoint 2010 on Windows 7, follw the below mentioned steps:

1.Copy the installer(setup.exe) to your harddrive of installation (e.g. C:\SP2010)
2.Rename the installer to sp2010setup.exe
3.Extract the installation files by opening a Command Prompt (Run > CMD)
4.Type: C:\sp2010\sp2010setup /extract:c:\sp2010
5.This will extract the installer
6.Navigate in your Windows Explorer to: c:\sp2010\files\setup\config.xml
7.Edit this file in notepad and add the next line <Setting Id="AllowWindowsClientInstall" Value="True"/> just before the </Cofiguration> tag (Case sensitive)
8.Then Save the configuration file
9.Now check the required Windows Features are turned on, so go to Control Panel and select Turn Windows Features on or off, see below mentioned pictures and compare your machine windows feature and select those option which is not checked 


If you face any problem to fix Features, then run the following command in command prompt

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;WCF-NonHTTP-Activation

1.Install SharePoint 2010 by running c:\sp2010\setup.exe as administrator
2.Choose the Standalone Installation (as I recommend) which will Installs SQL Server Express initially
3.After the installation is complete you, will be prompted to start the SharePoint Products and Technologies Configuration Wizard. Make sure Microsoft SQL Server 2008 KB 970315 x64 is installed Before starting the wizard.
3.You may need to install HotFix KB976462 available here  before running the configuration wizard.

Saturday, March 6, 2010

Sharepoint 2010 Release Date is Announced

Watch Stephen Elop, President of the Microsoft Business Division, announce the launch of Office 2010 and SharePoint 2010 on May 12, 2010 at 11 a.m. EST.

http://sharepoint.microsoft.com/businessproductivity/proof/pages/2010-launch-events.aspx#fbid=xgWGLbzp9iv

Sharepoint 2010 - Calendar

A good efforts from Mark Willson on Sharepoint 2010 calendar with color

http://planetwilson.blogspot.com/search?updated-min=2010-01-01T00%3A00%3A00Z&updated-max=2011-01-01T00%3A00%3A00Z&max-results=1

Saturday, February 13, 2010

What Operating Systems are suppoting to SharePoint 2010


Windows version/edition (64 bit only)


SharePoint 2010 support


Windows Server 2008 R2 Foundation


No


Windows Server 2008 R2 Standard


Yes


Windows Server 2008 R2 Enterprise


Yes


Windows Server 2008 R2 Datacenter


Yes


Windows Web Server 2008 R2


No


Windows HPC Server 2008


No


Windows Server 2008 R2 for Itanium-based systems


No


Windows Server 2008 Standard


Yes


Windows Server 2008 Enterprise


Yes


Windows Server 2008 Datacenter


Yes


Windows Web Server 2008


No


Windows Storage Server 2008


No


Windows Small Business Server 2008


Yes*


Windows Essential Business Server 2008


Yes*


Windows Server 2008 for Itanium-based systems


No


Windows Server 2008 Foundation


No


Windows Vista


Developer-only**


Windows 7


Developer-only**

Monday, February 1, 2010

What are the different topologies for SharePoint 2010?

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=fd686cbb-8401-4f25-b65e-3ce7aa7dbeab

Sunday, November 22, 2009

SharePoint 2010 Beta 2 and Silverlight 4 Beta available

Microsoft announced the availability for SharePoint 2010 Beta 2

http://blogs.msdn.com/sharepoint/archive/2009/11/18/sharepoint-2010-public-beta-is-now-available-for-download.aspx

At the PDC in n Los Angeles, Scott Guthrie announced the availability of Silverlight 4 beta:

http://team.silverlight.net/announcement/silverlight-4-beta-is-now-available/
http://www.silverlight.net/getstarted/silverlight-4-beta/