Thursday, December 16, 2010

How to identify a SharePoint Site?

We have lot of websites in internet and many of them are in SharePoint. So if you see any good looking site on internet and you want to check whether it is sharepoint based site or not?

There are some really cool exceptional ways.

Take "View Source" from any browser of your site. You will see something like <head> <meta name = "Generator" content="Microsoft SharePoint"/>

Dont forget to check Javascript section just after <Title>

You will see reference JS from src="/_layouts/1033/init.js"

If its SharePoint site there are also webservice with it. You can call any of webservice (If banned you will see "Unknown Error" page). e.g .

Otherway is check images folder available in 12 hive folder(e.g., it will show you image available in 12 hive folder.

Monday, December 13, 2010

Session State Error in SharePoint 2010

ASP.NET session state may be used on SharePoint 2010 pages. This service is automatically disabled in normal installations of SharePoint 2010. To enable session State in SP 2010 follow beleow steps:-
    • Enter the following PowerShell command in the SharePoint 2010 Management Shell window:
      Enable-SPSessionStateService –DefaultProvision.
    • Steps for PowerShell:-
    • Go to all programs-->Microsoft SharePoint 2010 products-->SharePoint 2010 Managment Shell.
    • On each web application for which you want to use session state, edit the web.config file and set the enableSessionState property of the pages element as follows:
      <pages enableSessionState="true".

Friday, December 10, 2010

Session Error occur on SharePoint Site

Some times Session error occur on your sharepoint portal server when installing project/User Control on SharePoint Server. The user control handling some session value on that page.

To overcome the error used following steps:-
1.       Go to Central Admin à Application Management à Configure Session State à enabled session state.
2.       From a command prompt, navigate to the Microsoft.NET 2.0 Framework directory(C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG).
3.       Open web.config file and modified as follows:-
4.       Uncomment the line:- <add name=”Session” type=”System.Web.SessionState.SessionStateModule” />
5.       Modified the line:- <pages /> to <pages enableSessionState=”true” … />
6.       From a command prompt:- change c:\Documents and setting… to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
7.       Run the command:- aspnet_regsql.exe -S  <server_name>  -d <database_name>  -ssadd  -sstype c  -E
8.       Where server name = is the database server where your database is located (Mentioned in error page).
9.       Where database name = is the content database of your shared services provider(Mentioned in error page.
10.   Make IISReset.