Windows SharePoint Foundation


There are not a lot of differences with configuring FBA for SharePoint 2010 compared to 2007, but there are a few.  For instance, SharePoint 2010 no longer supports “classic FBA”, rather forms based authentication is provided through Claims Authentication.  There is also the introduction of the Secure Store Service which is the next-gen of the Single Sign On service of old.

Both of these come into play when configuring Forms Based Authentication.

1 . Configure SQL for membership store

The membership store is still created using the ASP.NET SQL Server Setup Wizard.  This is launched from the .NET 2.0 Framework folder on the server at:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe

This wizard will take you thorough the steps and will build out the SQL database for you.




2. 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 admins, 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 and locate central administration site


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.



Add Role Provider

Go back to the Web Application page and open up Providers page.  Here we will create a provider for Roles and Users.  Set feature to .NET Roles and click Add… in the Actions pane to add a new role provider.  I called it FBARoleProvider and selected the right type and connection string.



Add Membership Provider

Now set feature to .NET Users and click Add… from the actions pane to add a membership provider.


Select the correct type and connection string, and whatever behaviors you choose.

That’s it for the providers for Central Admin.

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.




3 . Configure Secure Store Web Service to use SQL Membership Provider

Everything we did for Central Admin site, we are going to do for theSecurityTokenServiceAppliaation which is in the SharePoint Web Services application.


4. Create Extranet Web Application

Ok, finally we are ready to create our web application (called SharePoint – FBA) that will use FBA authentication.

In Central Admin, Select the Application Management page, and select Manage web applications.  Select New from the ribbon to create a new web application.

Select Claims Based Mode Authentication as Authentication Type. Allow anonymous access and select values for all the other options until you get to the “Enable Forms Based Authentication“.

Add the values we created earlier in the section “Enable Forms Based Authentication” for role and membership provider.



You can specify your custom login page, I will do in later posts.



Click ok and application will be created.

So now our application has been created but we need to configure the same roles and membership providers for this application too, previously we did for only central administration.


So our new web application is here in IIS manager, I will configure it with roles and members


Add a new connection string


Open the .NET Roles page for our web application.  You will receive a warning that the default role provider is not trusted.  There is a pre-configured SharePoint related role and membership is available, so we don’t need to create our own.



Now create some new roles and user for our web application


When u try to open new roles you will see following error message, simple ignore it


We do not have any roles in our database at this point, so let’s create two (StandardUser, SuperUser) by clicking Add… in the actions pane.


Now we need to do the same for .NET Users.  Open the .NET Users page.  You will get a similar warning saying the default is not trusted.  Assuming you don’t let’s add some.  Click Add… from the Actions pane to add users, and assign them roles.



Now create and open the site collection



After creating a new site collection when u open it you will see the following screen


As we have created a user in sql server database and that user is site collection administrator, so use for based authentication.



So you have been logged in with sql server user. That’s it.


Quick steps are one click handlers that performs some operations. Now with SharePoint 2010 and SharePoint designer 2010 it is possible to define quick steps easily.

In this post, we are going to see how we can add new ECB options for list items and also see how to add button in existing ribbon tab. These both options are now possible with SharePoint Designer 2010.

Creating ECB menu option in MOSS 2007 requires creating feature targeting edit control block with CustomActions and deploying it on server.

However there is one limitation for adding control in existing ribbon tab. You cannot have JavaScript function, showing message, disabling controls etc. when creating quick step using Designer 2010. These all can be done via in feature. We will have a detailed post in this topic going forward which is a vast topic.

Open you site and select a list, you will see “New Quick Steps” menu on the top right side.

Let’s go ahead and create one ECB menu option for lists. Open SharePoint Designer 2010. Connect with the site. If you notice, SPD2010 is way different from SPD2007. There are so many differences. SPD2010 looks very clean and clear. It gives very user friendly interface than SPD2007.

Click on Lists and Libraries and choose the list on which you want to create ECB menu item. I have created a new list “Quick Step List”

Double click on the Tasks List to make it open on right side panel, you will see list work flows and custom actions on the top ribbon, we can create new custom actions and work folws from here

When you click on custom action you will see 5 options

I am using “List Item Menu” for this demo because I want to add a quick action on all items page for the list. After clicking you will see the following screen.

Give the name and description. Here you can choose if you have your own page, you can send user to this page with parameters. If you want to initiate any workflow you can do that from here. Or you can also send user to any other url that you wish.

Just to demonstrate i am using Google image and redirecting user to google.com from ECB menu. So mention that URL, use 16 by 16 image of Google, which will be shown to user in the menu item. And finally click on OK. And you are almost done. Remember this image should be in the IMAGES folder under 14 hive. (New structure, not 12 hive like in MOSS 2007)

Save it and move to list item page and create a new entry.

Click on the link and you will be moved to google home page

If you want to edit settings for this quick action, there is a panel for quick actions settings, find you setting and edit it.

Same actions can be added for new disp and edit form, have a try.

Special thanx to SharePointKings for helping me to write this post.

This feature is some of the very much awaited features amongst all new features in SharePoint 2010. People like to edit the item without opening that item in window. Just like ASP.NET grid provides the way of edit and then update by clicking edit button and then updating the record. 

Well, now this was possible in MOSS 2007 as well, but it required little trick, but with SharePoint 2010, it is easy to do that.

Just go to the view settings of any list and then enable the in line editing option.

Check in line editing option and save.

Now move back to list and move mouse cursor near the list item, you will see an “edit” icon against each list item

When u click on the icon, the selected row will be edited and 2 more icons, save and cancel will be displayed.

Make your changes and save. That’s it.

With the integration of Visual Studio 2010 and SharePoint 2010, creating features are now much easier than with previous versions of either tool. To begin creating a feature to modify the Site Action menu, create a SharePoint 2010 empty project in Visual Studio 2010, making sure to chose a Farm solution rather than Sandbox. After the project has been created, you will see the below structure.

Now add a new module in the project, I am naming it “SiteActionMenue”

You will see following files added in the project

You can delete sample.txt file

Remove module section and replace with this site action script

<CustomAction


Id=toolPaneWebpart


Description=Toolpane Webpart


Title=ToolPane Web part Action


GroupId=SiteActions


Location=Microsoft.SharePoint.StandardMenu


ImageUrl=”/_layouts/images/settingsIcon.png”


Sequence=10001>

<UrlAction
Url=_layouts/WebpartConfiguration/MyPage.aspx />

</CustomAction>

Note : We have specified a url to the page, we will add that page later.

Set default site for this application when creating the new project, otherwise you can set in projects properties, see the following screenshot


Save the project and press F5

Go to site action and you will see a context menu.


Now go to project and add a new content page.


Press add and this will add a page in the solution within appropriate folder


Now press F5

After clicking on site action menu you will be redirected to page you have created.


That’s it, how simple it was, let me know in case of any confusion.

Hi,

In this article we will see the new concept called relationship which was highly anticipated in SharePoint 2010 and which was lacking in MOSS 2007.

After a wait now it’s finally here with SP 2010. We can define the delete constraint over the lists. When we have a lookup column in child list pointing to a parent list and if we have defined the cascading delete constraint then we can allow deleting all child records when parent record is deleted or we can restrict deleting parent record when child record exists. This is the same behavior that we have in SQL Server delete constraint.

So let’s go and open our Employee Leave lists that we created for our earlier posts. If you have not gone through it, I would recommend you go through it to understand more concepts of SP 2010.

Go to list settings – Click on Employee ID lookup field which is pointing to Employee parent list’s Employee ID field and scroll down to find this.

Do remember that to enforce the constraint on field, that field must be indexed. If it’s not, SharePoint will prompt you and index it for you.

Here we have put in a restriction on delete that means if we go and try deleting record from Employee List; it should not allow us to do so. So let’s try that out.

Go to Employee List, and delete any existing record that has lookup item exist in Employee Leave list and see what you get.

f you have defined two lists which have lookup reference to the parent list and if one list allows cascading delete and one do not, then parent list item will not be deleted because one list does not allow cascading delete. And this is what it should be.

When every list allows cascading delete then when you delete item from the parent list, it delete all related records from all related lists which have lookup field referenced to the parent list field. It also actually shows you the names of all lists which have the association while you are deleting the parent item. Check this out.

It is showing Employee Projects as well as Employee Leave, click on Ok to delete all related items in child lists as well as parent item.

Employee ID =1 removed

Related record from the leave list also removed

I hope now you will have a fair idea about the new relationship behavior functionality in SharePoint 2010


Hi

We will see one of the new concepts from SharePoint 2010 which is related lists. We already have employee list with us. All we need to do is create two more lists. I am creating two lists just to show you an example. We can have as many lists we want.

Create Employee Leave list and go to list settings and create one column which is Empoyee ID and take it as a look up column from Employee list and field Employee ID. One new feature here is when you define lookup column. Now we have the ability to fetch fields from that item and display it in the list as well.

So now when you enter the data in the Employee Leaves and select Employee ID from lookup drop down, you get something like this

So what happens is, here you would be able to see parent item details as well along with the actual list data.

Now go ahead and create one more list and call it an Employee Projects. Do the same thing, add columns and add EmployeeID column lookup to the Employee list and Employee Field.

Now add some data to this list. So what we have now is three list which are connected from Employee ID look up fields. Empoyee is the main list and then we have two lists with lookup to the Employee list employeeID field.

Open the List settings page of Employee List, create one view and call it a RelatedList view. Open the related list view and click on Site actions -Edit Page.


Go to options tab and then see we have new option called related list


If I select first employee it shows realted entries in project and leave lists.


If I select 2nd employee it shows records related to that entry.


Hi,

Earlier in MOSS 2007, it was not possible to validate the value of the field at the time of entering or updating the value in the list items. We could do that, but we had to rely on handlers or custom fields.

Yes, still for some requirement we have to go with these options, but at least for the basic and indeed useful now we have something called column validation in SharePoint 2010.

I have created one Employees List ready in my SharePoint site and I have added three columns to it. It has Joining Date, Leaving Date and weight.

We will see two things here. First is the field level validation and the other is item level validation. You can treat this as a custom field validation and event handler validation.

Go to list setting and then click on the weight and now we can see one new section which says column validation. So go ahead and add below condition and type in the user message that you would like to see when condition becomes false.

Click on ok.

Now being on the list settings page, you can see one more new option which is validation settings. Click on it to open a page.

In validation settings, you can actually compare one field with the other field from the list and then show a message to the user. Here in our list for example, we have two date fields and of course joining date cannot be greater than Leaving date. Hence we need to validate these two date fields.

Hence we put this formula inside it.

Now go to the list and add new item and enter weight less than 50 and enter joining date greater than leaving date and see validation triggering.

Now this is a cool new feature of SP 2010, isn’t it?

But yes do remember that we can have only one list validation, which is unfortunate i think and column validations are evaluated first and then list validation.

Next Page »