Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand

Archive for November, 2012

Changing Connection Timeout value for IIS 7

Posted by JP on November 27, 2012

For web applications including SharePoint, occasionally we might need to change the Timeout value.

We can achieve this through INETMGR tool.

Step 1: Open INETMGR

image

Step 2: Choose Advanced Settings

Select your web application from the left pane and click on the Advanced Settings from the Actions pane.

image

Step 3: Set Connection Timeout

In the appearing dialog box expand the Connection Limits group.

image 

Set the value in the Connection Time-out (seconds) property.  Please note that the value measures in seconds.

Step 4: Restart the Web Application

You can restart the web application or do an IISRESET for the changes to take place.

Advertisements

Posted in C# | Leave a Comment »

Squadron – Empty List Addin

Posted by JP on November 23, 2012

In this article we can explore a new Addin inside Squadron for SharePoint 2010 tool.

Empty List Addin

The Empty List Addin can be applied for:

1. Lists

2. Libraries

The Addin performs the following:

1. Empty the list or library by deleting all items

2. Delete the list or library

The Addin is a quick utility as it helps in one click emptying/deleting of multiple lists/libraries.

clip_image002

Squadron is a SharePoint 2010 tool containing multiple addins. You can download the tool freely from Code Plex using following url.

http://squadron2010.codeplex.com/

clip_image004

After downloading & installing you can run the Squadron tool from Start Menu > Squadron.

clip_image006

EMPTY Operation

Click on the Empty List item from the left pane. You will get the following screen with Lists & Libraries listed.

clip_image008

clip_image009

The Lists & Libraries are selected based on the URL, Hidden properties. You can change the URL from the URL text box given.

Now we are going to perform the EMPTY operation. Please note that all the entries in the selected lists will be deleted. You an manually select the list/library to perform the EMPTY operation.

To select all the lists/libraries use the context menu associated to Check All / Uncheck All.

clip_image010

After selecting the list, click on the Empty Selected button from the right hand side.

clip_image012

Please note that the selected Tasks list contains the following data before the operation.

clip_image014

On clicking the Empty Selected button, you will get the following prompt.

clip_image016

You can click the Yes button to continue if you are sure about deleting all items in the selected list. Now returning to the SharePoint list you can see the items are deleted.

clip_image018

This concludes our EMPTY operation.

clip_image002[1]

The Show Count check box shows the item count of each list or library.

The Show Hidden check box shows the hidden lists & libraries (including Quick Launch, System)

clip_image020

DELETE Operation

Now we can try the DELETE operation. Please note that the DELETE operation deletes the selected lists and libraries. For performing this operation I prefer you use a temporary site with lists & libraries.

clip_image022

After selecting the items, click the Delete Selected button. You will get the following confirmation dialog.

clip_image024

On confirming yes, the selected items are deleted. You will see the items missing in the next refresh.

clip_image026


Code

Following is the code for EMTPY operation.

private void PerformEmpty()

{

using (SPSite site = new SPSite(SquadronContext.Url, SquadronContext.GetUserToken()))

{

using (SPWeb web = site.OpenWeb())

{

foreach (string title in NameList.CheckedItems)

{

SPList list = web.Lists[title];

int count = list.Items.Count;

for (int x = list.Items.Count – 1; x >= 0; x–)

{

list.Items[x].Delete();

}

SquadronContext.WriteMessage(title + " EMPTY performed by deleting " + count.ToString() + " items");

}

}

}

SquadronContext.WriteMessage("Performed Empty operations.");

}

Following is the code for DELETE operation.

private void PerformDelete()

{

using (SPSite site = new SPSite(SquadronContext.Url))

{

using (SPWeb web = site.OpenWeb())

{

foreach (string title in NameList.CheckedItems)

{

SPList list = web.Lists[title];

try

{

list.Delete();

SquadronContext.WriteMessage(title + " DELETE done.");

}

catch (Exception ex)

{

SquadronContext.WriteMessage("DELETE Exception for " + title + " " + ex.ToString());

}

}

}

}

SquadronContext.WriteMessage("Performed DELETE operations.");

RefreshList();

}

References

http://squadron2010.codeplex.com/

Summary

In this article we have explored the EMPTY & DELETE operations of Squadron for SharePoint 2010 tool. I repeat that this tool is free for use and in the long run there should be more and more utilities incorporated.

Posted in C# | Leave a Comment »

SharePoint 2010 Shortcuts

Posted by JP on November 21, 2012

Please find SharePoint 2010 Shortcuts from our Friend Salaudeen Rajack!

http://salaudeen.blogspot.com/2012/11/sharepoint-2010-keyboard-shortcuts.html

 

image

Good to see with Alt + \ opening the Site Actions menu

Posted in C# | Leave a Comment »

HP Sizer for SharePoint 2010

Posted by JP on November 17, 2012

In this article we can explore HP Sizer – a Capacity Planning tool for SharePoint 2010 deployments. This tool helps in building optimized configurations for SharePoint deployment.

clip_image002

Who is the owner of the Tool?

HP Alliances and Performance Lab is the owner of the tool. This is collaboration between HP and Microsoft.

What is the purpose of the Tool?

The tool addresses the Capacity Planning & Performance Requirement for SharePoint 2010 server. The tool helps in finding optimized configurations based on the Usage Parameters.

Download

You can download the tool from following location:

http://tinyurl.com/sp2010-hpsizer

After installation, start the tool from Start Menu > Programs > Hewlett-Packard > HP Sizer for Microsoft SharePoint 2010 as shown below.

clip_image003

On executing the tool you will get the following application.

clip_image004

For finding an optimized configuration click on the Build a Solution button as highlighted above. You will get the following wizard. The wizard pages are self-explanatory to give assistance to the user.

clip_image006

Click the Next button to continue. In the appearing page enter a name for the solution.

clip_image008

In the next page choose the Business Profile. Depending on the selection the next pages will load the most appropriate parameters. For time being choose SMB (Small Business) and click Next button.

clip_image010

You will get the following Usage Data page.

clip_image012

The page is auto populated with following parameters.

1. Number of Users If there are 50 users in the organization, you can enter the value here.

2. Number of Users Concurrent on a Day On a typical day if 90% of users are present then enter 90 here

3. Maximum Number of User Requests per hour The number of user requests per hour.

clip_image014

These parameters are important to build an efficient configuration involving multiple servers in the farm. You should have already captured this information from the User during Requirement gathering phase.

Click the Next button to continue and you will get the following page.

clip_image016

Here you can specify Percentages of User Activity types. The total should be equal to 100%. For example in a typical scenario, the user will work with Site / My Site (library / list) for most of the time say 50%. The rest of the time the user will be involved in search operations, and then you can enter 50% for Search.

The last row asks about the amount of database modifications. If the system involves reading of data most of the time, then you can choose the Low option. But if there are create / update / delete operations frequently, then you can choose the High option. For time being leave the defaults.

Click the Next button to continue and you will be in the Application Services page.

clip_image018

The Application Services page allows you to foresee the usage of Application Services. As you know there are different Services like:

· Excel Services

· Performance Point Services

· Indexing Services

· Office Client Services

If you anticipate particular service gives much load to the server, then you can choose the Yes option.

You can click the Finish button to view Sizer recommendation.

clip_image020

From the result we can see that there are 3 servers recommended.

1. Web Front End

2. Search Index Server

3. Database Servers

In the next pages you can select the solution & storage architectures. Leaving the defaults click the Next button to continue. You can click on the Calculate Full Solution button from the bottom area. The tool will then come up with the Pricing, Hardware Configuration information too.

clip_image022

Really it helps. Huh?

So this concludes our overview the HP Sizer Tool. I hope you enjoyed it.

clip_image014[1]

Among the following types of persons involved in SharePoint:

1. SharePoint Administrator

2. SharePoint Developer

3. SharePoint Architect

This tool fits well in the SharePoint Architect’s Pocket.


References

http://tinyurl.com/sp2010-hpsizer

Summary

In this article we have explored the HP Sizer Tool for SharePoint 2010. In real word planning scenarios this tool should give a quicker overview of the configuration need ahead.

The tool also contains other paid components too.

Posted in C# | Leave a Comment »

SharePoint 2010 – Quick retrieval of Site Collection Size

Posted by JP on November 7, 2012

In this article we can see how to solve a real life scenario involving retrieving size of libraries & lists.

Scenario

Your customer site collection exceeded 100 Giga Bytes in size. You are assigned to create a Site Collection Size report that shows the Library & List entries along with the Size. The report is crucial to take decisions on possible migration of items into separate site collection.

clip_image002

Solution

Following are the solutions possible:

1. Iterate through each list / library entries and calculate size of file, file version, recycle bin. This way would be time consuming and may timeout on large site collection execution.

2. Use StorageManagementInformation() method for quicker retrieval


Implementation

For implementing the solution using the second approach:

· Create a Windows Forms application

· Add reference to Microsoft.SharePoint assembly

· Set the project property > build > target platform to Any CPU

. Add the following controls to the main form.

clip_image004

On click of the execute button add the following code.

private void ExecuteButton_Click(object sender, EventArgs e)

{

using (SPSite site = new SPSite(UrlText.Text))

{

// Retrieve Document Library entries

DataTable table = site.StorageManagementInformation(

SPSite.StorageManagementInformationType.DocumentLibrary,

SPSite.StorageManagementSortOrder.Decreasing,

SPSite.StorageManagementSortedOn.Size,

1000

);

// Retrieve List entries

table.Merge(site.StorageManagementInformation(

SPSite.StorageManagementInformationType.List,

SPSite.StorageManagementSortOrder.Decreasing,

SPSite.StorageManagementSortedOn.Size,

1000)

);

grid.DataSource = table;

}

}

Squadron for SharePoint 2010

A SharePoint utility application is created with the above functionality. You can download it from:

http://squadron2010.codeplex.com/

Following is the screen shot on execution of Squadron:

clip_image006

For retrieving Site Collection Size information, click on the Site Size item from the left pane and then the Execute button. You should get the result as shown below.

clip_image008

For saving the result, right click on the grid and use the Export Data option.

References

http://squadron2010.codeplex.com/

Summary

In this article we have explored a quicker approach in retrieving site collection size entries. I hope the information is useful and please note that the above information is available through Central Administration as well. The method StorageManagementInformation() is a deprecated one and should not be used with very large row count parameter, as it may raise memory issues. The source code for the article is attached.

The Squadron tool is free and it contains other utilities too for working with SharePoint 2010. In future I believe there will be more and more utilities available as Squadron core is built using plugin based architecture.

Posted in C# | Leave a Comment »

How to change the local drafts folder for document library?

Posted by JP on November 6, 2012

The Check Out operation requires either a local drafts folder or server folder to keep a copy of the working file.

image

Checking out to local folder, enables the convenience of working offline on the file.  Later point of time you can connect back and check in the changes.

How to change the Local Drafts folder?

You can change the local drafts folder inside MS Office 2010 Word / Excel / Power Point.

Run Word application and point to File > Options.

image

In the appearing dialog, choose Save tab

image

Set the option The server drafts location on this computer

Set the Server Drafts location property and click the OK button.

Testing

Now you can try checking out a document from the document library.  The file should be copied to the folder specified.

Posted in C# | Leave a Comment »

Stsadm window in Squadron

Posted by JP on November 6, 2012

Welcome to the utility documentation for Squadron.

clip_image001

If you do not have Squadron for SharePoint 2010, you can download it from here:

http://squadron2010.codeplex.com

Stsadm Window

The Stsadm window allows executing Stsadm command through Squadron application. The command output / errors will be redirected back to the window. You can perform copy / paste operations using this feature.

After executing the application click on the Site Size item from the left pane:

clip_image003

You can use the Execute button to execute STSADM commands in the green box as shown above.

clip_image005

References

http://squadron2010.codeplex.com

Summary

In this article we have explored how to use the Stsadm command window inside Squadron for SharePoint 2010.

Posted in C# | Leave a Comment »

Workflow Terminator in Squadron

Posted by JP on November 6, 2012

Welcome to the utility documentation for Squadron.

clip_image001

If you do not have Squadron for SharePoint 2010, you can download it from here:

http://squadron2010.codeplex.com

WF Terminator

WF Terminator helps with selecting and terminating an unwanted workflow. After executing the application click on the Site Size item from the left pane:

clip_image003

Enter the URL of the site in the area provided and select the state as Running from the drop down list.

clip_image005

You can also use different states to see workflows in Completed / Cancelled / Terminated / Orphaned states.

On finding the workflow to be terminated clicks the Terminate button. You will be prompted for confirmation.

clip_image006

On clicking Yes the Workflow will be terminated. You can verify the results to ensure the state.

References

http://squadron2010.codeplex.com

Summary

In this article we have explored how to select & terminate a workflow using Squadron for SharePoint 2010.

Posted in C# | Leave a Comment »

Site Size Report in Squadron

Posted by JP on November 6, 2012

Welcome to the utility documentation for Squadron.

clip_image001

If you do not have Squadron for SharePoint 2010, you can download it from here:

http://squadron2010.codeplex.com

Site Size Report

The Site Size addin helps in generating Size Information of the SharePoint site.

After executing the application click on the Site Size item from the left pane:

clip_image003

Enter the URL of the site in the area provided:

clip_image005

Click the Execute button to generate the data. Please wait for few seconds for the activity to complete. The Site Size entries get listed below as shown.

clip_image007

The Site Size entries show the following columns:

· Url of Document Library / List

· Size

· Modified Date


 

Saving the Report

Squadron provides infrastructure to save the report. You can right click on the grid and choose the Export Data option as shown below:

clip_image009

You will be prompted to enter the CSV (Comma Separated Values) file location.

clip_image011

After saving, the file gets opened in the appropriate file handler in your machine.

clip_image013

Advanced Export

For advanced export option allowing selection of columns, please find the following link:

Advanced Export

References

http://squadron2010.codeplex.com

Summary

In this article we have explored how to generate the Site Size Report using Squadron for SharePoint 2010.

Posted in C# | Leave a Comment »

My Site Report in Squadron

Posted by JP on November 6, 2012

Welcome to the utility documentation for Squadron.

clip_image001

If you do not have Squadron for SharePoint 2010, you can download it from here:

http://squadron2010.codeplex.com

My Site Report

The My Site addin helps in generating My Site information of SharePoint 2010 site.

After executing the application click on the My Site item from the left pane:

clip_image003

Enter the URL of the site in the area provided:

clip_image005

Click the Execute button to generate the data. Please wait for few seconds for the activity to complete. You My Site entries will get generated as shown below (if everything goes fineJ)

clip_image007

Saving the Report

Squadron provides infrastructure to save the report. You can right click on the grid and choose the Export Data option as shown below:

clip_image009

You will be prompted to enter the CSV (Comma Separated Values) file location.

clip_image011

After saving, the file gets opened in the appropriate file handler in your machine.

clip_image013

Advanced Export

For advanced export option allowing selection of columns, please find the following link:

Advanced Export

References

http://squadron2010.codeplex.com

Summary

In this article we have explored how to generate the My Site Report using Squadron for SharePoint 2010.

Posted in C# | Leave a Comment »