Windows Sharepoint Services 4.0

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:


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 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.


We all know that there are many out of the box web parts available in MOSS 2007 and now more in SP 2010. Sometimes it is important to see what they offer. Recently I came across to a very good document management related out of the box web part which is relevant documents web part.

This web part was a part of MOSS 2007 and continues to be a part of SharePoint 2010.

This web part is under content rollup section in SP 2010 and under miscellaneous section in MOSS 2007 and these are the configurable properties.

Now I am adding a document

The Relevant Documents web part displays documents that are relevant to the current user. This web part can show following;

Documents last modified by current user
Documents created by current users
Documents checked out by current user

So ultimately it becomes my checked out, my created, and my last modified documents.


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


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.

Introduction to Workflows

Microsoft Windows SharePoint Services provides a robust, customizable work environment for users to create, collaborate, and store valuable business information. Now, with Microsoft Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007, you can attach custom business processes to these documents or list items.

You can represent these custom business processes by using workflows. A workflow is a natural way to organize and run a set of work units, or activities, to form an executable representation of a work process. This process can control almost any aspect of an item in Windows SharePoint Services, including the life cycle of that item. The workflow is flexible enough to model both the system functions and the human actions necessary for the workflow to complete.

You can create workflows that are as simple or complex as your business processes require. You can create workflows that the user initiates, or workflows that Windows SharePoint Services automatically initiates based on some event, such as when an item is created or changed.

Suppose you need to create a simple workflow that routes a document to a series of users for approval or comments. This workflow would include actions that the system needs to perform, as well as provide interfaces for the users to interact with the workflow in prescribed ways. For example, Windows SharePoint Services would send an e-mail message to the selected users when the document was ready for review. Those users would then need to be able to notify Windows SharePoint Services when they had completed their reviews and, optionally, enter any comments. The workflow framework included in Windows SharePoint Services 3.0, and extended in SharePoint Server 2007, enables you to model such complex work processes and present them to end users in an easily understood, unobtrusive manner that guides them through each step of the process.

Windows Workflow Foundation supports two fundamental workflow styles:

  • Sequential workflows Represents a workflow as a procession of steps that execute in order until the last activity completes. However, sequential workflows are not purely sequential in their execution. Because they can receive external events and include parallel logic flows, the exact order of activity execution can vary.

  • State machine workflows Represents a set of states, transitions, and actions. One state is denoted as the start state, and then, based on an event, a transition can be made to another state. The state machine can have a final state that determines the end of the workflow.

You can create workflows of either type for Windows SharePoint Services and SharePoint Server.

Sequential Workflows

Sequential workflows can best be represented graphically as a flowchart of actions, with a beginning, an end, and a sequential flow direction from start to finish. Sequential workflows can incorporate flow structures such as repetition, looping, and parallel branches, but ultimately progress from the initial action to the final action.

For example, suppose you were to chart the simple workflow that routes a document in Windows SharePoint Services for approval. When the workflow starts, the system notifies the specified reviewer, by e-mail message, that he or she has a document to review. The reviewer then reviews the document and notifies the system that the task is completed and whether the reviewer approves or rejects the document. Based on the reviewer response, the workflow executes one of two parallel branches. If the reviewer approved the document, the system moves the approved document to a specific SharePoint document library and then sends an e-mail message to the entire team notifying them of the approved document. If the reviewer rejects the document, the system notifies the document author. In either case, the workflow then reaches its end and terminates. Figure 2 shows this workflow.

Figure 2. Conceptual diagram of a sequential workflow

Diagram of a sequential workflow

State Machine Workflows

Unlike sequential workflows, state machine workflows do not have a prescribed execution flow, and need not have an end. Instead, state machine workflows define any number of states which an item may inhabit, and the events that transition the item from one state to another.

Figure 3 represents a simple document publishing process, modeled as a state machine workflow. The workflow is initiated when a document is created, and ends when the document state is set as completed. In between, however, the document does not travel in a predetermined path, but instead transitions from state to state as events occur.

The state machine workflow is composed of state activities. Each state activity represents a state for the item. Each state activity can contain optional state initialization, state finalization, and one or more event handlers. Each event handler activity can handle one event. In response to the event handled, some processing can be done, and a transition can be made to another state.

Figure 3. Conceptual diagram of a state machine workflow

Diagram of a state machine workflow

One characteristic of both sequential and state machine workflows is that each type of workflow can be broken into a collection of discrete actions—those performed by the system, and those taken by users. You can consider these actions to be the building blocks of workflows. In WF workflows, these actions are referred to as activities.

if it is helpful, plese dont forget to leave a comment.

You have already seen Web part verb if you have worked with web parts. They appear when you press the down arrow button key available in every web part at right hand side corner. Each item in that menu is called verb. Look in to below image.


As you can also see in the image that we have created our own custom web part verb as well and added to the web part.

So let us start with explaining the method how we can achieve this functionality. First you need to know that there are two kinds of event you can bind it to a verb. Either it can be client side event or it can be server side event. As you can see in the image, to show you I have created two verbs and bound events respectively. You need to overrides WebPartVerbCollection. First you need to create your web part verb and then finally we will add them to the default web part verb collections for the web part.

Let us see it in action.

First web part verb will be handling the server side event and the other web part verb will be handling the client side event.

public override WebPartVerbCollection Verbs

List <webpartverb> objVerbs = new List <webpartverb>();

WebPartVerb verb = new WebPartVerb(this.ID, new WebPartEventHandler(ServerSideHandler));
verb.Text = “Click to execute server side code”;
verb.Visible = true;
verb.Description = “This click will execute server side code”;

WebPartVerb verb1 = new WebPartVerb(this.ID + “newone”,”alert(‘hi you clicked me!!!’);”);
verb1.Text = “Click to execute client side code”;
verb1.Visible = true;
verb1.Description = “This click will execute client side code”;

WebPartVerbCollection allverbs = new WebPartVerbCollection(base.Verbs,objVerbs);

return allverbs;


As you can see, client side event, we have declared it in the constructor of webpart verb itself. There you can also write something like or any other client side code that you want.

If we talk about the server side code, then it is handling one webpart event ahndler which is ServerSideHandler. To show you how it works, I have created a textbox in that event and added to the controls collection of web part. So by clicking on that verb, a new textbox will generated and added to the webpart.

public void ServerSideHandler(object sender, WebPartEventArgs e)
TextBox txtName = new TextBox();
txtName.TextMode = TextBoxMode.MultiLine;
txtName.ID = “txtname”;
txtName.Text = “Hey you clicked server side code and see i got generated here”;


Above are the steps that you need to implement. That will complete your functionality of achieving custom web part verb and adding them to your web part.

See the figure below when I click on client side verb, what happens!!

And see when I clicked on server side web part verb, what happenes!!





So I hope that now you have got the idea about web part verb. So now you can create it and use them according to your requirements.

Thank you.

if it is helpful, plese dont forget to leave a comment.

Next Page »