Unable to connect to SQL Server session database the connection string was returned by an instance of the IPartitionResolver type

Today, I was playing with authentication providers for setting up the site with anonymous access.

Suddenly the site started throwing the below error. I have no clue what’s wrong on the DB Server, then I restarted the DB Server no luck L

 

Exception:

Exception Type: System.Web.HttpException  Exception Message: Unable to connect to SQL Server session database. The connection [...]


CodePlex Release : List Search WebPart

Hi Community,                        

I have contributed List Search WebPart for SharePoint in CodePlex.

Project Description:

                              This Project provides the List Search WebPart for WSS 3.0 / SharePoint 2007. Just add the WebPart to page and specify the list name, filter fields, display fields and criteria.

Simple Interface for Tool Part with advanced features for list search.

Features

Ajax Enabled
Easy configuration [...]


How to Create Custom Menu Item in Site Actions

The below sample feature creates new menu item in Site Actions menu, Please replace the GUID in the below code.

Sample Feature File

<?xml version=”1.0″ encoding=”utf-8″?>

<Feature

    Id=”<GUID>”

    Title=”Custom Menu Item”

    Description=” ”

    Version=”1.0.0.0″

    Scope=”Site”

    Hidden=”False” xmlns=”http://schemas.microsoft.com/sharepoint/”>

    <ElementManifests>

        <ElementManifest

            Location=”elements.xml” />

    </ElementManifests>

</Feature>

 

Sample [...]


Programmatically Retrieve List of Document Libraries

The following code snippet is used to retrieve the list of document libraries.

 

SPWeb _web = SPContext.Current.Web;

SPListCollection ListColl = _web.Lists;

foreach (SPList _lst in ListColl)

{

if (_lst.BaseTemplate == SPListTemplateType.DocumentLibrary)

{


WSS 3.0 Application Templates Grouped by Business Area

If you are looking for free application template, which suites your business area, read this resource on TechNet. It has list of 40 Application templates grouped by the following business category.

 

Business Management/Finance

Human Resources

Operations/IT

Project Tracking/Product Management

Sales/Marketing

Specialized/Verticals


How to Use Resource File in SharePoint 2007

 

Create Resource file using Visual Studio IDE

Copy the resource file into 12 hive resource folder

GetLocalized method from SPUtility to read the values from resource file

Syntax:

SPUtility.GetLocalizedString(“$Resources:<<ResourceFileName,ResourceKeyName>>”, “<<ResourceFileName>>”, lang);

Example:

SPUtility.GetLocalizedString(“$Resources:MyResources,FirstName”, “MyResources”, lang);

 

Sample Source:

using System;

using System.Runtime.InteropServices;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Xml.Serialization;

 

using Microsoft.SharePoint;

using [...]


How to Enable Document Information Panel in MOSS 2007

By Default the document information panel will not be enabled in document library.

Go to Library Settings

Click Advanced Settings

Enable allow management of content types in Advanced Settings.

Click the Document Content Type and click on Document Information Panel settings.

Check show always option to enable document information panel.


Item Updating or Updated Event Occurs twice in Document Library

 

Item Updating or Item Updated Event in SharePoint 2007 occurs twice, if require checkout option is enabled for document library.

I found the following workaround from Microsoft Support for this issue.

 

Check the value of vti_sourcecontrolcheckedoutby
in BeforeProperties and AfterProperties, if the both values are null then the event is triggered by check in else the event [...]


How to Find the SharePoint Version Installed in System

To find the installed version of SharePoint in system,

Browse to Central Administration -> Operations -> Servers in Farm [Topology and Services]

 

Version information will be displayed for each and every server.


How to Use RSS WebPart in SharePoint

 

Create New WebPart Page.

In Edit Mode, Click add WebPart then select RSS Viewer WebPart from gallery.

Click Modify Shared WebPart to change to Edit mode of WebPart, then specify the RSS URL.