Online Training On SharePoint

Monday, 29 December 2008

Answers for the SharePoint Administration Questions

Here are the Answers for the SharePoint Administration Questions provided at

1. B, C, D

2. A, B, D

3. B, D

4. A, C, D

5. A, C, D

6. D

7. C, D

8. A, C

9. A, B, C

10. A, C

11. A, C

12. B, C

13. A, B, D

14. A, C
For installing/uninstalling feature only STSADM commands can be used. Feature needs to be deactivated before uninstalling them.

15. A, C

16. B

SQL Server 2005 Embedded Edition gets installed when we install WSS with the default options.

17. C

The site collection that is assigned as the destination for a content migration or a content deployment path must be created by using the Blank Site template.

18. C

19. D

Solution needs to be added, deployed, retracted and deleted.

There is no solution removal. The correct command to delete the solution is:
stsadm -o deletesolution -name SampleSolution.wsp

20. B

When the Content DB is taken in offline status no new further site collection can be created in the Web Application.

21. C

22. B, C, D

We can not directly migrate from WSS 2.0 to MOSS

23. D

All other policies comes OOB with SharePoint.

24. A, C, D

Following levels are available to be reported in Event Log:
None, Error, Warning, Audit Failure, Audit Success, Information

25. D

Following levels are available to be reported in Trace Log:
None, Unexpected, Monitorable, High, Medium, Verbose

26. A, B, C, D

All of the options are correct.

27. A, C, D

There is no Form Server role in SharePoint Farm.

28. C

29. B, C

30. C

31. A, B, C, D

32. C

33. A, B, C

See more details about Managed Path

34. A, B, C, D

All of these kind of sources can be crawled OOB in SharePoint 2007.

35. A, B, C

There is no Page Level Caching.

36. A,D

Monday, 22 December 2008

Refreshing SharePoint Page Automatically

Recently we have a requirement to reload one SharePoint page after each one minute. For this purpose we have written a JavaScript code. This code is placed in the Content Editor Web Part:

(I am not able to put the code here so adding the code in the SkyDrive....)

This script will reload the page ever 60 seconds.

We can now hide this Content Editor web part from the view on the page, by setting the following properties as:

Height: 0px
Width: 0px
Chrome Type: none

Wednesday, 19 November 2008

Data Sync Issue for a User between Active Directory and Site Collection

Frequently we see a issue where there is mismatch for a user data available in SharePoint Site and the data available in Active Directory for a user. The Data in Active Directory is modified but that is not reflecting in SharePoint Site. So the data between this two are not in sync.

This is how I the data sync works between SSP and Site Collection. The data is imported to SharePoint SSP from active directory and from SharePoint SSP to SharePoint Site. So SharePoint SSP sits in between SharePoint site and Active Directory. The data from SSP flows based on the configured sync (full or incremental).

When someone adds a User into a Site Collection through a People Picker the profile will be created in the SharePoint site with the most current information available on SharePoint SSP at that point of time. Profiles on SharePoint siets are not updated automatically/incrementally from the SharePoint SSP. So if there are any changes made in the Active Directory they will not be reflecting into the SharePoint Site. Hence the data between Active Directory and SharePoint Site is not in sync.

As a workaround to fix this issue we can delete the profile from Site collection and re-add this into the site collection. This will force the site collection to pull new data from the SSP. It may happen that this process will not work for first time. Trying to do this process multiple time should get a profile with most recent data from the SSP into site collection.

You can also find interesting to read User Details are not showing in the SharePoint Site

Tuesday, 4 November 2008

Getting SharePoint Server version with PowerShell Scripting

Recently I have written script with PowerShell to get the version of SharePoint. Here is the script with the detailed explanation:

set-location HKLM:
$var= get-itemproperty -path "\Software\Microsoft\shared tools\web server extensions\12.0" -name Version
Write-Host "MOSS 2007 Version: " $var -foregroundcolor white -backgroundcolor blue
$Input = Read-Host "Please Press any key to continue"
set-location c:\

The set-location Cmdlet sets the working location to a specified location. That location could be a directory, a sub-directory, a registry location, or another location stack. So with the set-location HKLM we are setting the location to HKey_Local_Machine which is one node in registry.

Now we are declaring a variable with $var syntax. This variable will store the version of the SharePoint.

The Get-ItemProperty cmdlet gets the properties of the specified items. -path Specifies the path to the item and -name Specifies the name of the property or properties to retrieve. So here we are going to Hive Folder and getting the version. This value will be stored in var variable.

The Write-Host cmdlet creates a customized output window. We can specify the color of text in that windows by using the ForegroundColor parameter and we can specify the background color of the window by using the Background Color parameter.So here we are appending "MOSS 2007 Version:" with the value retrived of SahrePoint version with variable var.

The Read-Host cmdlet reads a line of input from the console. We can use it to prompt a user for input. So here this command displays the string "Please Press any key to continue:" as a prompt. When a value is entered and the Enter key is pressed, the value is stored in the $Input variable. With that we are setting the location to C:\.

You can also find interesting to read: Getting All the Web Objects URL in a SharePoint farm using PowerShell Scripting

kick it on

Sunday, 2 November 2008

Hiding Site Collection Documents and Site Collection Images Libraries In SharePoint

Recently we got a requirment where we either need to hide/delete "Site Collection Documents", "Site Collection Images" Libraries from the viewlsts.aspx page. Users should not be able to access these libraries from this page.
While trying to delete these sites we realised that delete option for these libraries is not visible from the GUI. When we attempted to delete with the SharePoint Designe we got the error:
“Server Error: The folder selected for deletion contains one or more lists, document libraries, or galleries that your web site requires in order to function correctly. Therefore, you cannot delete the folder.” So there was no easy way for us to delete these libraries.
Then we started trying to hide these libraries. Hiding of these libraries is possible with SPList.Hidden property in the SharePoint user interface. Following is the code snippet with which the libraries were hided:

SPSite site = new SPSite(http://localhost/);
SPWeb web = site.OpenWeb();
SPList list = web.Lists["Site Collection Documents"];
list.Hidden = true;
list = web.Lists["Site Collection Images"];
list.Hidden = true;

Friday, 31 October 2008

Frequently used Search Terms in SharePoint

Here some of the Search Terms used in SharePoint. I found them very easy to understand:

Content Index: For SharePoint to search any content, the content must first be indexed. A content index combines details on all the information in the content sources. When users perform searches, the index is queried for content that matches the user-entered terms.

Crawl: For a search to be accurate and effective, the system updates the index regularly based on a schedule that you define. A crawl is the process by which the SharePoint index is rebuilt or updated to include new information:
a. A full update is a complete recrawl of all SharePoint content to update the index.
b. An incremental update only reviews items that have changed or been added since the last update.

iFilter: SharePoint crawls a number of file types to include content in the documents, the system does not automatically crawl some file types and requires you to install a special tool, called an iFilter, to allow the SharePoint search service to index the documents. For example, you must install an iFilter to support PDF document indexing.

Content Scope: Searching the entire content index or a content source may be too broad of a search. By way of example, if we lose our ID card visiting the front lobby of a office and go back to search for them, we limit your search to that lobby, not the entire building. In essence, scopes tell SharePoint what sections of an index to search. We may have scopes that represent smaller subsets of data such as user profiles or the human resources site, that allow users to limit their searches.

Managed Properties: We can configure site column as managed properties so that users can search for documents based on specific content in the Advanced Search interface. For example, if we have a customer site column, we can turn it into a managed property, and when users conduct a search from the Advanced Search interface, they can select Customer from a drop-down list. This refines the search and limits it to items relating to a specific customer.

Attempt a Question on SharePoint Search: Question on SharePoint Search

Thursday, 23 October 2008

Accessing Multiple Document Control from Application Pages in SharePoint

We got a requirment where user needs to select the Document Library (We have 100's of Document Libraries) and upload multiple documents into the selected Document Library from a page other than OOB Pages. Since SharePoint comes with in built Multiple Document control we decided to use that and call this from an Application Page.

Multiple document upload control is an Active X control.In SharePoint we have “Upload.aspx” page in %\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS. This page contains Multiple Document Upload Control which is used by all the sites in the site collection to upload multiple documents. I copied the content of this file into another file with the name upload1.aspx for safety.

Following are the arguments which this control accepts:

1. List GUID - GUID of the list in which the docs will be uploaded
2. Root Folder - If we need to upload the docs in the folders inside the libraries. Not using this parameters.
3. Source - Not using this.
4. MultipleUpload - 1 indicates to use multiple document upload control

We have put a button in the application pages and redirected it using Response.Redirect with these 2 parameters. This opened the multiple document upload control and while uploding the documents uploaded into the List selected as the first parameter.

Friday, 17 October 2008

Free Books On SharePoint Technologies

I tried to consolidated some free books available on SharePoint (MOSS) and WSS. I keep updating this post as I get more free books.

Here are the links:

1. Planning and architecture for Office SharePoint Server 2007, part 1

2. Planning and architecture for Office SharePoint Server 2007, part 2

3. 7 Development Projects for Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0

4. Deployment for Office SharePoint Server 2007

5.Office SharePoint Server 2007 Technical Library
Have some issues with Vista.

6. Microsoft Office SharePoint Server Best Practices

7. SharePoint Server 2007 Software Development Kit

8. Windows SharePoint Services 3.0 Software Development Kit

9. Records Management Guide for Microsoft Office SharePoint Server 2007


10. Design and build sites for Office SharePoint Server 2007


11. Web Publishing and Planning Guide with Microsoft Office SharePoint Server


12. Microsoft Office SharePoint Server Document Management


Monday, 13 October 2008

Information Type supported for lookup columns

While creating columns (Site Column or Plain Column) in SharePoint list and selecting type of column as lookup column, only the column from the selected list, having type of information as Single line of text or Calculated can be selected. Other columns having information such as Multiple line of text, Choice – Drop down list, Choice – Radio buttons , Choice – Checkbox,
Number, Yes/No, Person or Group and Hyperlink does can not be selected as a lookup column. So need to be careful while desinging the solution.

Tuesday, 7 October 2008

Interview Questions on SharePoint

Prepare for SharePoint interviews with Multiple questions and with Interview questions on SharePoint on:

Also these questions will help to prepare for SharePoint Certifications.

Sunday, 5 October 2008

Getting All the Web Objects URL in a SharePoint farm using PowerShell Scripting

I tried to access the Web Objects URL in SharePoint Farm with the Power Shell. It was really easy to get them. Following are the steps to do so:

1. To use Power Shell for SharePoint we need to log in into the server as the SharePoint object Model does not allow to access remotely.

2. Now we need to add the Microsoft.SharePoint Assembly in the Power Shell environment. To add the Microsoft.SharePoint assembly to the PowerShell environment we need to run the following command in Power Shell:

[System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c“)

We can also use the static method LoadWithPartialName on the Assembly class SharePoint. The syntax would be:

(Although the LoadWithPartialName has been deprecated.)

3. Now created functions and filters. With these we will get different objects and pass them through the Hierarchy. (Check the SharePoint Hierarchy)

function AcessFarm
return [Microsoft.SharePoint.Administration.SPFarm]::Local

This function will return the SPFarm object. We will pipe this object with the next Filter. This will get all the web services on the SharePoint Farm.

filter AcessWebServices
$webServices = new-object Microsoft.SharePoint.Administration.SPWebServiceCollection($_)


filter AcessWebApplication

filter AcessSiteCollection

filter AcessWeb

Now we need to pipe these functions and filters to get a table of WebURL of the Web objects in the Farm. The command looks like:

AcessFarm AcessWebServices AcessWebApplication AcessSiteCollection AcessWeb format-table -property url

The last format-table will put the output in a table format and the URL property of Web Objects will display only the URL's of all the Web Objects.

PowerShell is very strong feature and SharePoint Admin can do the magic with this. With the above command we can now access all the properties and method of SPWeb Objects. We can do many further advanced tasks with these objects.

You may also find interesting to read:

Getting SharePoint Server Version with PowerShell and Deploying custom SharePoint site collection with the help of PowerShell in Windows Server 2008

Friday, 3 October 2008

Demos On SharePoint

Following Demos are very useful to learn SharePoint (I found these demos on Microsoft site):

1. Configure a SharePoint Server 2007 site to receive e-mail

2. Deploy an administrator-approved form template

3. Simplify collaboration with a SharePoint team site

4. Streamline business processes with forms and workflows

5. Create a presentation from slides in a slide library

6. Create and manage a SharePoint calendar

7. Make it easier to find information with views

8. The new SharePoint Server 2007 Fluent interface

9. Prepare to back up files on Office SharePoint Server

10.Connect people to information with portals

11.Enterprise Content Management with SharePoint Server 2007

12.Different ways to check documents in and out of a SharePoint site

13.Use Word 2007 to post to a SharePoint blog

14.Create a recurring meeting with a Meeting Workspace in a SharePoint calendar and then connect it to Outlook 2007

15.Collaborate using a recurring meeting in a SharePoint calendar

16. Back Up Office SharePoint 2007

17. Using SharePoint to manage your classroom

18. Search for information on a SharePoint site

19. Add KPIs to your SharePoint site

20. Display KPIs in a dashboard

21. Give a user access to a SharePoint site

22. Find just the data you need by using Filter Web Parts in a dashboard

23. Make better business decisions with reports and dashboards

24. Enable Excel Services and data connections for a SharePoint team site

25. Use a Document Workspace to collaborate on a document from a SharePoint library

26. Use an approval workflow in SharePoint Server 2007

27. Create and publish Web pages on a publishing site

SharePoint Trainings and Project Work

We (I and my team. Consist of people certified in SharePoint ) provide the SharePoint Training . We have three kind of courses available in SharePoint:

1. Beginner Level
2. Intermediate Level
3. Advanced Level

All these courses contains extensive case studies and tests at the end of each level. We have defined the course content for these three levels. We can send the course content on request on below email.

We also execute projects in SharePoint involving OOB features or customization of sites with Visual Studio. We can give stand alone code solution on SharePoint.

We also provide consultation on SharePoint Projects. We can also provide solution/feedback to your problems.

You can contact us on

Monday, 22 September 2008

URL's to access SharePoint Pages

Here are some URL's to access pages in SharePoint. These URL are helpful to save time and hassles of clicking many times to reach a speicfied page:

The URL's are grouped based on the major functioanlity area:

Users and Permissions:

People and Groups: _layouts/people.aspx

Site Collection Admins: _layouts/mngsiteadmin.aspx

Advanced Permissions: _layouts/user.aspx

Master Pages: _Layouts/ChangeSiteMasterPage.aspx

Look and Feel:

Title, Desc, and Icon: _layouts/prjsetng.aspx

Navigation: _layouts/AreaNavigationSettings.aspx

Page Layout and Ste Templates: _Layouts/AreaTemplateSettings.aspx

Welcome Page: _Layouts/AreaWelcomePage.aspx

Tree View: _layouts/navoptions.aspx

Top Nav Bar: _layouts/topnav.aspx

Site Theme: _layouts/themeweb.aspx

Reset to Site Definition: _layouts/reghost.aspx

Searchable Columns: _Layouts/NoCrawlSettings.aspx

Site Content Types: _layouts/mngctype.aspx


Site Columns: _layouts/mngfield.aspx

Site Templates: _catalogs/wt/Forms/Common.aspx

List Templates: _catalogs/lt/Forms/AllItems.aspx

Web Parts: _catalogs/wp/Forms/AllItems.aspx

Workflows: _layouts/wrkmng.aspx

Master Pages and Page Layouts: _catalogs/masterpage/Forms/AllItems.aspx

Regoinal Settings: _layouts/regionalsetng.aspx

Site Administration

Site Libraries and Lists: _layouts/mcontent.aspx

Site Usage Report: _layouts/usageDetails.aspx

User Alerts: _layouts/sitesubs.aspx

RSS: _layouts/siterss.aspx

Search Visibility: _layouts/srchvis.aspx

Sites and Workspaces: _layouts/mngsubwebs.aspx

Site Features: _layouts/ManageFeatures.aspx

Delete This Site: _layouts/deleteweb.aspx

Site Output Cache: _Layouts/areacachesettings.aspx

Content and Structure: _Layouts/sitemanager.aspx

Content and Structure Logs: _Layouts/SiteManager.aspx?lro=all

Search Settings: _layouts/enhancedSearch.aspx

Site Collection Administration

Search Scopes: _layouts/viewscopes.aspx?mode=site

Search Keywords: _layouts/listkeywords.aspx

Recycle Bin: _layouts/AdminRecycleBin.aspx

Site Collection Features: _layouts/ManageFeatures.aspx?Scope=Site

Site Hierachy: _layouts/vsubwebs.aspx

Portal Site Connection: _layouts/portal.aspx

Site Collection Audit Settings: _layouts/AuditSettings.aspx

Site Collection Policies: _layouts/Policylist.aspx

Site Collection Cache Profiles: Cache%20Profiles/AllItems.aspx

Site Collection Output Cache: _Layouts/sitecachesettings.aspx

Site Collection Object Cache: _Layouts/objectcachesettings.aspx

Variations: _Layouts/VariationSettings.aspx

Variation Labels: _Layouts/VariationLabels.aspx

Translatable Columns: _Layouts/TranslatableSettings.aspx

Variation Logs: _Layouts/VariationLogs.aspx

Site Settings: _layouts/settings.aspx

Monday, 15 September 2008

Changing Master Page for Document Library in SharePoint

We came across a issue with applying master page to the Document Libraries. We have applied a master page to the sites and any web pages that is created in the sites and sub sites shows this master page. However when we click on a document library the default SharePoint Master Page was coming.

On further analysis what we found that there are three master pages used in SharePoint.
1. Master Page for Site Pages. This Master page is used in home page (default.aspx), WebPages etc..
2. Master Page for System Pages like Document Library Item Form pages (All Items.aspx, NewForm.aspx, EditForm.aspx, etc)
3. Master Page for Application Pages under "Layouts" folder. The application pages uses the "application.master" page.

So in the scenarion, we had set the Site pages to use the master page but not the system pages. When we click on document library we will be landing on the Allitems.aspx which is the View Page (System Page) for the "All Items" View. The System Pages are still using the default master page with the default theme and thats the reason the default theme is rendered for the document library.

To Overcome this issue, we need to use the "MasterURL" and the "CustomMasterURL" property to set the master page of "System Pages" and "Site Pages" respectively. In our custom site definition "Onet.xml" find the "Configuration" we used for your template and add the above mentioned properties to it. Set the master page URL (Master Page gallery path) as the value for this both the properties so that our master page and theme in it will be applied to both Site Pages and the System Pages. Following Code snippet can be used for this:

Monday, 18 August 2008

Learning Microsoft Office SharePoint 2007 Step by Step

For my team I tried to consolidate some links from Microsoft to learn basics in SharePoint. I am putting the same here (See also how to learn SharePoint @ How to Learn SharePoint):

Looking For Online Training On SharePoint?I Can help you
Drop a Note to Moss Experts
Download the course contents Here
To schedule for a free demo fill the details Here

o Introducing Microsoft Office SharePoint Server 2007
o Introduction to sites, workspaces, and pages
o Introduction to My Site

Introduction to Libraries:
o Introduction to libraries
o Create a library
o Add one or more files to a library
o Open or edit files in a library
o View or change information about a file or folder in a library
o Set up templates for a library
o Delete a library

If this post helped you to learn SharePoint please visit the sponsors from @

Introduction to Lists:
o Introduction to lists
o Create a list
o Delete a list
o Manage list templates
o Managing lists or libraries with many items

OOB SharePoint Sites:
o Create a blog
o Create a dashboard
o View a list of sites
o View and analyze survey results
o Search for text or files on a site

o Create or change a view
o Show or hide columns in a view

Versioning in SharePoint:
o Introduction to versioning
o Enable and configure versioning for a list or library
o View version history of an item or file
o Restore a previous version of an item or file
o Copy a file to another location
o Check out and edit a file
o Check in a file
o Undo check-out and discard changes to a file
o Require check-out for files in a library
o Require approval of items or files in a list or library
o Use a workflow to manage content approval for a library

If this post helped you to learn SharePoint please visit the sponsors from @

Configuring Alerts & Emails:
o Manage alerts
o Create an alert or subscribe to an RSS Feed
o Cancel an alert or unsubscribe to an RSS Feed
o Introduction to incoming email
o Add content to sites by sending email
o Send email to members of a SharePoint group
o Enable and configure email support for a list or library
o Store and manage contact information

Meeting and Document Workspace:
o Create a Meeting Workspace site
o Customize a Meeting Workspace site
o Add, change, and delete pages in a Meeting Workspace site
o Manage the attendees in a Meeting Workspace site
o Assign and track tasks in a Meeting Workspace site
o Create and manage a Document Workspace
o Manage your documents and tasks on your My Site

If this post helped you to learn SharePoint please visit the sponsors from @

Security Features:
o About security features of Windows SharePoint Services 3.0
o About controlling access to sites and site content
o Permission levels and permissions
o Manage permission levels
o Manage permissions for a list, library, folder, document, or list item
o About managing SharePoint groups and users
o Manage SharePoint groups
o View users and SharePoint groups and edit the Quick Launch group list
o Remove users and groups from site access
o Enable anonymous access
o Configure permissions for a blog
o Apply Information Rights Management to a list or library

If this post helped you to learn SharePoint please visit the sponsors from @

Customization the SharePoint Site:
o Introduction to customizing sites and pages
o Change the default image on the home page
o Change the site colour or theme
o Introduction to site navigation
o Customize site navigation
o Configure and manage a shared navigation structure across sites
o Default site templates
o Create or edit a master page
o Plan the structure of site collections and sites

Web Parts:
o Introduction to customizing pages by using Web Parts
o Add or remove a Web Part
o Customize Web Parts
o Customize a Web Part Page
o Connect data in Web Parts
o List View Web Part
o Page Viewer Web Part
o Image Web Part
o Site Users Web Part
o Content Editor Web Part
o XML Web Part
o Form Web Part

If this post helped you to learn SharePoint please visit the sponsors from @

Site Column & Content Types:
o Create a site column
o Introduction to content types
o Create a site content type
o Change a content type for a list or library
o Add an existing content type to a list or library
o Turn on support for multiple content types in a list or library

o Introduction to workflows
o Use a Three-state workflow
o Add or change a workflow for a list, library, or content type
o Remove a workflow from a list, library, or content type
o Manually start a workflow on a document or item
o Complete a workflow task
o View workflow tasks
o View the status of a workflow in progress
o Cancel a workflow in progress

Business Intelligence:
o Introduction to Business Intelligence features
o Create and publish Key Performance Indicators (KPIs)
o Introduction to Excel Services and Excel Web Access

Check Also the Free Training Material on SharePoint

Looking For Online Training On SharePoint? Moss Experts Can help you
Drop a Note to Moss Experts
Download the course contents Here
To schedule for a free demo fill the details Here

Friday, 15 August 2008

Error while Modify the Web Parts in SharePoint Page

I come across a strange error when I was trying to modify the web parts in a SharePoint page when I have not selected Edit Page from the Site Action Menu. The error says:


Server Error in '/' Application.
The file is not checked out. You must first check out this document before making changes. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: Microsoft.SharePoint.WebPartPages.WebPartPageUserException: The file is not checked out. You must first check out this document before making changes.Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[WebPartPageUserException: The file is not checked out. You must first check out this document before making changes.]
Microsoft.SharePoint.WebPartPages.SPWebPartManager.SaveSomeChanges(SPLayoutProperties layoutProperties) +1468
Microsoft.SharePoint.WebPartPages.WebPart.SaveSomeChanges(SPLayoutProperties layoutProperties) +82
Microsoft.SharePoint.WebPartPages.SPWebPartManager.WPSaveSomeChanges(SPLayoutProperties layoutProperties) +135
Microsoft.SharePoint.WebPartPages.SPWebPartManager.ApplyChangeList(String changeString) +721
Microsoft.SharePoint.WebPartPages.SPWebPartManager.OnLoad(EventArgs e) +712
System.Web.UI.Control.LoadRecursive() +101
System.Web.UI.Control.LoadRecursive() +211
System.Web.UI.Control.LoadRecursive() +211
System.Web.UI.Control.LoadRecursive() +211
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2588


Upon further trial I found a Web Part was there on the SharePoint page which was in Minimized state. So if I try to modify any web part in this page the above error comes. I restored this web part and then error has gone and I was able to Modify the other web parts in the page without everytime after doing Edit Page from the Site Action.

Strangely this works fine if click Edit the Page first and try to modify other web parts even when one web part on the page is in minimized state!!!

You can also find interesting to read Restoring Closed Web Parts and All Web Parts on a Page

Attempt a Question on WebParts: Question on Web Parts

Wednesday, 13 August 2008

Restoring the Closed Web Parts on a SharePoint Page

When we place a web part on a SharePoint Page we get three options in the edit menu for this web part:
1. Minimize: This option only minimizes the web part for that user in the same session. If the same user comes again to the same page again he will see the web part.
2. Delete: This option will delete the web part from the page and no body will be able to use this web part. The web part will not be loaded into the page.
3. Close: This option will close the web part for everybody. But with this option the web part is still loaded on the page but it is just not displayed. For this web part resources are allocated that are never used. We can also close the web parts by clicking on 'X' button.

We can see the closed web parts by appending ?Contents=1 at the end of the URL of the page.
But I struggled to restore these closed web part. Surprisingly the reset option which comes on the web part maintenance page also does not do this. Then after some trials the following steps worked:

1. Go to Site Actions and then to Edit Page
2. Now Click Add a Web Part link
3. Go to Advanced Web Part gallery and options
4. On top of this pane you will see Closed Web Parts. Once you click this it will show all the web part which are closed on this page.
5. Now Drag closed web part onto the page.

These steps will put the closed web part back on the page.

Attempt a Question on WebParts: Question on Web Parts

Thursday, 24 July 2008

Creating a view to show all items in a list in SharePoint

If we want to show all the items in a list even when they are stored in multiple folders inside a list we need to use SPViewScope.Recursive. To use this we can create a new view with SharePoint object Model and then use this Recursive property. This view will show all the items in a flat list irrespective of folder hierarchy in the list.

Here is the code snippet:

SPSite spsite = new SPSite("http://mysite/");
SPWeb spweb = spsite.OpenWeb();
SPList splist = spweb.Lists["mylist"];
SPViewCollection spviewcollection = splist.Views;
string strMyView= "MyView";
System.Collections.Specialized.StringCollection viewColumnFields =
new System.Collections.Specialized.StringCollection();
string filter =

//show all the items which has age less than 100
spviewcollection.Add(strMyView, viewColumnFields, filter, 100, true, true);
//This will add the view in the list and make it the default view
spview.Scope = SPViewScope.Recursive;
//With this all the items inside the folders will be displayed

Thursday, 17 July 2008

Locking SharePoint Site for Read/Edit

We can use a stsadm command to lock a Sharepoint site for further read or write when we are doing the maintenance on the site. This feature comes really handy.
The command to use for this purpose is:
stsadm -o setsitelock -url http://localhost -lock {none noadditions readonly noaccess}
Here we have 4 kind of locks available:
None: This option sets the site collection to unlock. With this site will be open to read and write.
Noadditions: This option stops any new addition to the data. Suppose we have 1000 character in a list. With this option user can reduce this 1000 char but can not further add any character.
Readonly: With this no write operation will be allowed. Site will become read only.
Noaccess: This value sets the site collection unavailable to all users. User can not access the SharePoint Site.
Also we can use the following STSADM command to get the lock status for the site:
stsadm -o getsitelock -url http://localhost

Monday, 23 June 2008

Error while saving list as list template

If we try to save a large list as a list template, we may see the following error due to the list being too large:

"The list is too large to save as a template. The size of a template cannot exceed 10485760 bytes."

We can increase the maximum size of a list / site template by running the following command
stsadm -o setproperty -propertyname max-template-document-size -propertyvalue 50000000

Some imp points about this command:

  • The propertyvalue parameter is in bytes, so the example above will increase the maximum size to approx 50MB.
  • There is a hard limit of 500MB so the value must be less than 524288000 or you will get an error when saving the list as a template.
  • The above increases the maximum size of both site and list templates
See Also: SharePoint Object Model Code to Create a SharePoint List using List Template: Code for Creating List using List Template

Attempt A Question On List Backup: Question on List Backup

Attempt A Question on Site Template: Question On Site Template

Tuesday, 17 June 2008

Take a multiple question test on SharePoint

If you want to take a beginner level test on SharePoint go to:
SharePoint Test Link
This test contain 20 multiple type questions on SharePoint.

Playing Audio/Video files within SharePoint Application

To play the Audio/Video files in SharePoint follow these steps:

1. Upload the file into a document library.
2. Add a content Editor Web Part to your site.
3. Add the code in the HTML:

<OBJECT id="VIDEO" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject">
<PARAM NAME="URL" VALUE="fileurl">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount" value="1">

1. CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" is the class id for Windows Media player.
2. URL will point to the location of the file. Upload this file to document library and put the URL for that file.
3. autoStart specifies value indicating whether the current media item begins playing automatically.
4. uiMode specifies which controls are shown in the user interface.
Possible values: invisible, none, mini, full.
5. PlayCount specifies the number of times a media item will play. Minimum value of one.

Get the code here:

You may find interesting to read: Showing PDF documnet in SharePoint Pages

Attempt a question on Web Parts: Question on Web Parts

Friday, 6 June 2008

Introduction to Social Networking Web Parts in SharePoint 2007

Colleagues Web Part: This web part helps users to present their colleagues to visitors. The colleagues list is a presentation of other organization members that the specified user works closely with in terms of organizational structure, interaction (that is, e-mail and instant messaging conversations) and memberships. Users can also manually add and remove colleagues.

Colleague Tracker Web Part: This web part enables organization members to privately view their list of compiled colleagues and to modify their views and inclusion in their colleagues list. The colleague tracker Web Part enables the presentation of recommended colleagues and enables the user to modify colleague tracking by profile information. For example, users can modify the colleague tracker to present updated colleagues when anniversaries, profile properties, authored documents, and blogs change. Additionally, scoping the presentation can occur when users choose to view colleagues specifically for the user’s workgroup or organization-wide.

SharePoint Sites, Links, and Membership Web Parts: Provide the ability for users to view their own Office SharePoint Server site, group and mail list memberships and links as well as those that they have in common with others. Additionally, visitors can view a user’s memberships, Office SharePoint Server Sites and distribution group memberships.

In Common With Web Part: Provides a summary view of information relating to the memberships, organizational managers and colleagues that a visitor has in common with the owner of a My Site.

Presence Information: When coupled with Office Communications Server and Exchange Server, presence information that indicates online instant messaging status, Out of Office messages and contact information is displayed whenever user information is presented (that is, colleagues and colleague tracker Web Parts, etc.).

Tuesday, 3 June 2008

Some Important Tables with SharePoint 2007

Here is the list of some important tables in SharePoint Content DB:
  • Sites: This Table holds information about all the site collections for this content database.
  • Webs: This Table holds information about all the specific sites (webs) in each site collection.
  • UserInfo: This Table holds information about all the users for each site collection.
  • Groups: This Table holds information about all the SharePoint groups in each site collection.
  • Roles: This Table holds information about all the SharePoint roles (permission levels) for each site.
  • AllLists: This Table holds information about lists for each site.
  • GroupMembership: This Table holds information about all the SharePoint group members.
  • AllUserData: This Table holds information about all the list items for each list.
  • AllDocs: This Table holds information about all the documents (and all list items) for each document library and list.
  • AllUserData: This table has all the metadata which user provides in a document library.
  • RoleAssignment: This Table holds information about all the users or SharePoint groups that are assigned to roles.
  • SchedSubscriptions: This Table holds information about all the scheduled subscriptions (alerts) for each user.
  • ImmedSubscriptions: This Table holds information about all the immediate subscriptions (alerts) for each user.

Some queries with these tables:

-- Query to get all the top level site collections

SELECT SiteId AS Siteid, Id AS Webid, FullUrl AS FURL, Title, Author, TimeCreated FROM dbo.Webs WHERE (ParentWebId IS NULL)

-- Query to get all the child sites in a site collection

SELECT SiteId AS Siteid, Id AS Webid, FullUrl AS FURl, Title, Author, TimeCreated FROM dbo.Webs WHERE (NOT (ParentWebId IS NULL))

-- Query to get all the SharePoint groups in a site collection

SELECT dbo.Webs.SiteId, dbo.Webs.Id, dbo.Webs.FullUrl, dbo.Webs.Title, dbo.Groups.ID AS Expr1, dbo.Groups.Title AS Expr2, dbo.Groups.Description FROM dbo.Groups INNER JOIN dbo.Webs ON dbo.Groups.SiteId = dbo.Webs.SiteId

-- Query to get all the users in a site collection

SELECT dbo.Webs.SiteId, dbo.Webs.Id, dbo.Webs.FullUrl, dbo.Webs.Title, dbo.UserInfo.tp_ID, dbo.UserInfo.tp_DomainGroup, dbo.UserInfo.tp_SiteAdmin, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Email FROM dbo.UserInfo INNER JOIN dbo.Webs ON dbo.UserInfo.tp_SiteID = dbo.Webs.SiteId

-- Query to get all the members of the SharePoint Groups

SELECT dbo.Groups.ID, dbo.Groups.Title, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Login FROM dbo.GroupMembership INNER JOIN dbo.Groups ON dbo.GroupMembership.SiteId = dbo.Groups.SiteId INNER JOINdbo.UserInfo ON dbo.GroupMembership.MemberId = dbo.UserInfo.tp_ID

-- Query to get all the sites where a specific feature is activated

SELECT dbo.Webs.Id AS WebGuid, dbo.Webs.Title AS WebTitle, dbo.Webs.FullUrl AS WebUrl, dbo.Features.FeatureId, dbo.Features.TimeActivatedFROM dbo.Features INNER JOIN dbo.Webs ON dbo.Features.SiteId = dbo.Webs.SiteId AND dbo.Features.WebId = dbo.Webs.Id WHERE (dbo.Features.FeatureId = '00AFDA71-D2CE-42fg-9C63-A44004CE0104')

-- Query to get all the users assigned to roles

SELECT dbo.Webs.Id, dbo.Webs.Title, dbo.Webs.FullUrl, dbo.Roles.RoleId, dbo.Roles.Title AS RoleTitle, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Login FROM dbo.RoleAssignment INNER JOIN dbo.Roles ON dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOIN dbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOIN dbo.UserInfo ON dbo.RoleAssignment.PrincipalId = dbo.UserInfo.tp_ID

-- Query to get all the SharePoint groups assigned to roles

SELECT dbo.Webs.Id, dbo.Webs.Title, dbo.Webs.FullUrl, dbo.Roles.RoleId, dbo.Roles.Title AS RoleTitle, dbo.Groups.Title AS GroupName FROM dbo.RoleAssignment INNER JOINdbo.Roles ON dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOIN dbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOIN dbo.Groups ON dbo.RoleAssignment.SiteId = dbo.Groups.SiteId AND dbo.RoleAssignment.PrincipalId = dbo.Groups.ID

You can also find interesting to read Different Database created with SharePoint

SharePoint Terminology

Here are some important terms pertinent to SharePoint Technology:
  • Application page: Allows the use of inline custom code. Application pages or "_layout" pages are stored on the SharePoint Web server and made available via a Microsoft Internet Information Services (IIS) virtual directory. Though application pages behave much like other ASPX pages and allow the use of inline custom code, they differ from content pages in that they cannot be used to host SharePoint features such as dynamic Web Parts and Web Part zones.
  • Content type: A reusable collection of settings to apply to a certain category of content such as documents and folders. Content types are designed to help users organize their SharePoint content in a more meaningful way.
  • Custom action: Represents a link, toolbar button, menu item, or any control that can be added to a toolbar or menu that appears in the UI. We define custom actions by using a custom action element within a feature definition file. We can bind custom actions to a list type, content type, file type, or programmatic identifier (ProgID).
  • Event receiver: Evaluator of an event and definer of the behavior of an application. Windows SharePoint Services 3.0 allows us to define event handlers within libraries, lists, and sites. Event receivers can be defined by using a receiver element within a feature definition file.
  • Feature: A package of Windows SharePoint Services elements that can be activated for a specific scope and that helps users accomplish a particular goal or task. Windows SharePoint Services 3.0 introduces this inherently portable and modular functionality, which simplifies modification of sites through site definitions.
  • Master page: Pages that provide a consistent layout and appearance (look and feel) for SharePoint sites. They allow us to factor out layout, structure, and interface elements such as headers, footers, navigation bars, and content placeholders. Master pages in ASP.NET 2.0 and master pages in Windows SharePoint Services work in the same way.
  • Module: A file or collection of file instances that define the location where the files are installed during site creation. Modules are frequently used to implement a Web Part Page in the site. We can define modules by using a module element within a feature definition file.
  • SharePoint site: A Web site hosted in a virtual URL. A SharePoint site is a place for collaboration, communication, or content storage. Depending on your business needs, we can create sites such as team sites, blog sites, wiki sites, and others. We can customize a site's appearance, users, user permissions, galleries, and site administration by using the Site Settings administration pages.
  • SharePoint site collection: A collection of SharePoint sites that share common administration pages and site settings. Site collections allow you to share content types, site columns, templates, and Web Parts within a group of SharePoint sites.
  • SharePoint Web farm: A group of Office SharePoint 2007 servers that share the same configuration database. All site content and all configuration data is shared for all front-end Web servers in a server farm.
  • Site definition: A set of files that includes a master XML configuration file that is stored on all front-end Web servers. A site definition provides the basic blueprint for how sites look, what lists they include, their default navigational structures, and so on.
  • Site template: A package containing a set of differences and changes from a base site definition that is created through the UI or through implementation of the object model. The site template package is stored as a .cab-based file that can be downloaded or uploaded to site collections by users with the appropriate rights. Site templates offer a measure of portability to SharePoint applications.
  • Solution: A file that is a bundling of all the components for extending Windows SharePoint Services in a particular way. A solution file has a .cab-based format with a .wsp extension. A solution is a deployable, reusable package that can contain a set of Features, site definitions, and assemblies that apply to sites, and that you can enable or disable individually. We can use the solution file to deploy the contents of a Web Part package, including assemblies, class resources, and other package components.
  • Theme: A group of files (CSS, images) that allow you to define the appearance (look and feel) of Web pages. Themes in ASP.NET 2.0 and themes in SharePoint Products and Technologies work in the same way. Themes are used to help organizations to brand their portals and team sites. Office SharePoint Server 2007 includes a set of predefined themes. However, as a developer, we can create custom themes for our company.

Friday, 30 May 2008

Deploying custom SharePoint site collection with the help of PowerShell in Windows Server 2008

With the availability of the new Windows PowerShell and the IIS 7.0 Windows Management Interface (WMI) in Windows Server 2008 makes the scripted configuration possible for custom SharePoint site collection.

Consider this scenario: An organization is developing a custom site collection that will include various assets, such as file items within IIS virtual directories (for example, style sheets and navigation graphics), list items in SharePoint lists, and document templates in document libraries. When the development and test phases of the project are complete, the assets must be copied or moved to the production environment. If the range of assets is complex, it may be worthwhile to script the movement of these assets from one deployment to another. The PowerShell environment provides all the necessary facilities to make this possible.
Since SharePoint object model can be accessed from inside PowerShell scripts it is possible to build very sophisticated configuration and deployment processes by using PowerShell. When deploying SharePoint Products and Technologies, Windows Server 2008, and IIS 7.0, PowerShell brings several advantages:
Full access to the SharePoint object model: Before the availability of PowerShell, access to the SharePoint object model was only possible through the development of either console or Web applications, written in a .NET language, compiled, and then deployed together with any reference DLLs. In the PowerShell environment, all the namespaces within the SharePoint object model are available by inserting references to the required namespaces. Now Web administrators and developers can develop their own PowerShell scripts to access the object model. And PowerShell scripts are parsed for execution at run time so that no compilation is needed.
Cmdlets: Many cmdlets are currently available to access OS system services and objects. Also, the PowerShell environment is fully extensible; we can build our own cmdlets to perform custom processing and make these available to PowerShell scripts. For example, we can build cmdlets to query and configure SharePoint-enabled Web sites, with access to the both IIS 7.0 Windows Management Interface (WMI) and the SharePoint object model.
Another benefit of PowerShell when we combine it with the SharePoint object model is the ability to quickly build custom SharePoint utilities without having to develop and deploy compiled applications. Combining this technology with Windows Server 2008 and SharePoint Products and Technologies enables a whole new potential set of custom automated deployment and configuration processes by using scripts.

You can also find interesting to read: Getting All the Web Objects URL in a SharePoint farm using PowerShell Scripting

Monday, 26 May 2008

Thursday, 22 May 2008

IIS 7.0 with SharePoint Server

IIS 7.0 represents a significant evolution from earlier versions of IIS. While maintaining compatibility with IIS 6.0, several fundamental changes to the underlying architecture of the Web server allow for better functionality and deliver superior management functionality and extensibility.
Some of the most relevant changes for deployments of SharePoint Products and Technologies include:
Request Tracing: IIS 7.0 lets administrators create custom logging of requests to the Web server. This is especially useful in diagnosing error conditions such as memory leaks or frequent worker process cycling. The enabling of this feature can be done quickly and easily, and can greatly improve the ability of administrators to troubleshoot problems with Web applications. Request tracing rules can be configured for any combination of HTTP error codes, time delays, or system events. A log is created that has detailed information on each event that the administrator can review to diagnose the source of the problem.
In deployments of SharePoint Products and Technologies, one area where this can be especially useful is when an object on a page is causing an error. However, the message displayed on the page is not specific enough to determine the type or source of the error (for example, “An unexpected error has occurred”). More detailed analysis can be performed by reviewing the logs created by failed request access rules.
Dynamic configuration and improved availability: In earlier versions of IIS, many changes to Web application settings required full IIS resets to take effect. For 24-hours-a-day, 7-days-a-week operations, this has always presented challenges as the Web sites must be stopped and restarted to make these changes. With IIS 7.0, most of the configuration changes can occur dynamically, and will take effect as soon as the changes are implemented. Additionally, the recycling of application pools is now fully enabled as a task in both the management console and command-line interfaces for IIS 7.0. This new flexibility guarantees that changes to SharePoint Web applications can be implemented quickly with minimal effect on application availability.
New Task-Based Management Console: The IIS 7.0 management console has been completely rebuilt to feature a task-based interface in order to simplify the most frequently required tasks in the configuration and ongoing management of Web sites and applications. The new management console also allows for the management of remote IIS servers, reducing the need to start terminal sessions with those servers. The ultimate result of these improvements is increased productivity for administrators, as they can perform site configuration changes more quickly and intuitively than before. This eliminates the need to traverse through multiple tabs to find the individual items that have to be changed. In most cases, icons exist to perform the most commonly-required tasks in fewer steps than were previously necessary.
IIS 7.0 Command-Line Interface (CLI): IIS 7.0 has a comprehensive set of functions that can be invoked at a command prompt to perform common configuration tasks. This enables a new level of flexibility in creating configuration scripts that can automate Web site and application configuration. The CLI is accessed through AppCmd.exe, which can be accessed at a command prompt or in a batch command file. All key aspects of managing a server that runs IIS are available through this interface, such as the following:
· IIS sites and application pools can be created and configured
· List current applications, requests and worker pools
· Sites can be started and stopped, application pools can be recycled
· Backup and restore IIS configurations
· Export and import configurations
Access to the CLI can also be made through the Windows PowerShell, which contains several cmdlets (pronounced “command-lets”) that can access and manage the operating system.
IIS 7.0 Windows Management Interface (WMI): This consists of .NET namespaces that are used to access and manage IIS 7.0 configurations through a comprehensive set of classes and methods in the .NET Framework. This opens up new integration opportunities with other .NET-connected applications (for example, Windows SharePoint Services 3.0, Office SharePoint Server 2007, other .NET Framework applications). These namespaces can be accessed from inside custom .NET Framework applications or through the Windows PowerShell.
Worker Process Isolation: Worker processes, by default, are isolated in IIS 7.0, eliminating the need to modify IIS 6.0 configurations to enable process isolation (a best practice for environments that have fewer than five SharePoint Web applications).
Modules: In IIS 7.0, functional capabilities are managed through the inclusion of modules that are installed and referenced in configuration files. They give better control over features that are present within the Web Server role. For example, the various alternatives for authentication (that is, Windows integrated, digest, or forms authentication) are individually enabled as modules. Therefore, only those methods that are required for a given deployment of SharePoint Products and Technologies actually have to be installed and configured. This improves the manageability of SharePoint applications in addition to improving their security by reducing attack surface.

See Also: Getting All the Web Objects URL in a SharePoint farm using PowerShell Scripting

Tuesday, 20 May 2008

Changing the properties for default Templates

If we want to change the properties for a specific template we need to modify parameters in the webtemp.xml file.

1. To hide this template to change the hidden parameter and set this parameter to True. By default it is set to False.
2. If you want to change the title there is a parameter called title.

Same way you can change the description, order and images.

This file is located at at Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\1033\XML

Attempt A Question on Site Template: Question On Site Template

Monday, 19 May 2008

Comparing SharePoint Server with ASP.NET

Here are some of Advantages/Disadvantages of SharePoint apps over ASP.Net apps:
1. Many built-in features are available with MOSS which can be used to easily develop complex solutions.
2. Rich Security features which come built in.
3. Integrated with Content Management.
4. Very less efforts required to create basic sites with lot of features.
5. It is quite scalable.
6. OOB Integration with Office products.
7. Rich backup techniques
8. Business process can be integrated with Workflows.
9. Multiple sites can be created with the help of templates.
1. It is difficult to add custom code in SharePoint. Features and WSP files take time.
2. Diffcult to solve the problems in development.
3. Creating pages is easy then creating web parts.
4. Cost is very high.
5. Performance for ASP.NET apps is much better.
6. Very few experts are there.

Advantages/Disadvantages of ASP.Net apps over SharePoint apps:
1. Here we have lot of control on application in terms of DB, UI.
2. Less cost to build.
3. Easy to develop and deploy.
4. Plenty of resources.
1. Takes lot more time to get same functionality as of SharePoint.
2. There is nothing built in. So every solution needs to start from zero.
3. Good DB knowledge is also required to create sites having data.
4. Security needs to build.

kick it on

Wednesday, 14 May 2008

Removing 'My Sites' and 'My Links' from the SharePoint pages

To remove the 'My Sites' and 'My Links' pages from a site collection pages following approach needs to be followed:
1. Go to Central Admin
2. Go To Shared Services
3. Go to Personalization Services Permissions. This is available in the User Profiles and My Sites Section.
Now this will show all the user/groups. Here the permissions can be modified to hide these links.

Monday, 12 May 2008

Creating SSL enabled site collection in SharePoint

Here are the steps to create SSL enabled sites in SharePoint:

1. Go to central admin --> Create or extend a new web application --> Create a new web application.

2. Fill the details such as Web app, DB and App pool name. Select yes to enable SSL on the web application. If you are using host headers for this web app, then enter those too. It is important to set the port to 443, not 80.

3. After the web application has been created, reset IIS and then open up IIS mmc. Scroll to the IIS website that MOSS just created for you and select the right SSL certificate from the available certificates. Go to the Home Directory tab and click Advanced. We need to set the host header and the right IP for port 80. For SSL entries, select port 443 and the IP. Click on the edit button for SSL entries and check the 'Require SSL' box. Also check 'Require 128 bit encryption' to make this more secure.4. Now we can create our first site collection for this web app. MOSS will automatically create a new site collection for us and present us with a "https://.." link upon completion. We are now have a SSL ready web app.

You may also like to read: How to enable SSL for selected pages in MOSS

Related Posts with Thumbnails