Sunday, June 24, 2012

Handling Session Error in Multiple Front End Servers in Asp.Net 4.0

Perform the following steps to handle Session for Multiple Front End Servers

1) Add the tag under tag in the web.config file of all the front end servers

For Example:
<sessionState mode="StateServer" timeout="20" stateConnectionString="tcpip=server:port" />
   
Refer the following link for more information:
http://msdn.microsoft.com/en-us/library/h6bb9cz9(v=vs.100).aspx


2) Add the tag under tag in the web.config file of all the front end servers

The machine key can be generated from the following link:
http://aspnetresources.com/tools/machineKey

For Example:
<machineKey validationKey="41C11977666D4433D736559D3479711373A51E1F53161F81718B466B08AA23A48E45CF6F897C38F233C7A2A5A4C5754B73C53CF8A438417DFECE5EF2A63C1B82" decryptionKey="C13134ECD5DA5A8CBBE8FF0A0DCD973783B311C01ACBFD152F04DEBDA51613CB" validation="SHA1" decryption="AES" />


3) Start the ASP.NET State Service from "services.msc" and ensure that the client and server ports are the same.

If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection.

If the server is on the local machine, and if the above mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.

Taking Backup of Deployed WSP in SharePoint 2010

To take the backup of the WSP in SharePoint 2010,
Run the following commands from Powershell where SharePoint 2010 is configured.

Add-PSSnapin Microsoft.SharePoint.PowerShell
$farm = Get-SPFarm
$file = $farm.Solutions.Item(“mysolution.wsp”).SolutionFile
$file.SaveAs(“C:\WSPs\mysolution.wsp”)

This saves the wsp to the desired location. The WSP can then be deployed like any other solution.

Taking Backup of Deployed WSP in SharePoint 2007

To take a backup of installed WSP files in Central Administration, we need to run the SharePoint Farm Solution Extracator that can be downloaded from the following link

http://archive.msdn.microsoft.com/SPSolutionExtractor

Copy Dlls from the GAC

Open the CommandPrompt and Type:

cd c:\windows\assembly\GAC_MSIL

xcopy . C:\GacDump /s /y

This should give the dump of the entire GAC.