martes, 21 de febrero de 2012

Agregar servidores de bases de datos a una farm existente

En algunos escenarios es recomendable que las bases de datos de contenido estén alojadas en servidores de BD separados, el mismo caso se cumple para las BDs de Aplicaciones de Servicio como por ejemplo las  BDs del servicio de búsqueda.

En este post explica cómo agregar un servidor de bases de datos a una farm existente: http://geeks.ms/blogs/marchena/archive/2012/02/15/a-241-adir-servidores-de-base-de-datos-a-una-granja-existente.aspx

Paso a describir el procedimiento:

1. Primero debemos instalar un servidor de SQL Server 2008 R2 que disponga de las mismas actualizaciones del servidor de BD que aloja nuestra de BD de configuración (Verificar las actualizaciones). Este servidor debe estar unido al dominio.

viernes, 17 de febrero de 2012

Añadir servidores de base de datos a una granja existente

En SharePoint 2010 se administran una gran variedad de bases de datos. Tenemos la BD de Configuración, BDs de Contenido y BDs para las aplicaciones de servicio.

En algunos escenarios es recomendable que las bases de datos de contenido estén alojadas en servidores de BD separados, el mismo caso se cumple para las BDs de Aplicaciones de Servicio como por ejemplo las  BDs del servicio de búsqueda.

El procedimiento para agregar nuevos servidores de BD a la granja lo obtuve del siguiente enlace:http://technet.microsoft.com/en-us/library/cc262781.aspx

Paso a describir el procedimiento:

1. Primero debemos instalar un servidor de SQL Server 2008 R2 que disponga de las mismas actualizaciones del servidor de BD que aloja nuestra de BD de configuración (Verificar las actualizaciones). Este servidor debe estar unido al dominio.

Creating a Web Part with Custom Properties

Create a Visual Web Part project in Visual Studio. In the file VisualWebPart1.cs, add your custom properties:

SharePoint_Blog_Creating_a_Web_Part_with_Custom_Properties

The Personalizable attribute is what tells is the Web Part framework to store this property in the database. The WebBrowsable attribute is what tells the Web Part framework to make this property visible in the Edit Web Part properties pane. The WebDisplayName attribute changes the display name visible within the Edit Web Part properties pane. In this case, if we did not alter the display name, it would appear as CustomProperty. Since we have now altered the display name to include a space, these two words will not run together. The Category attribute will change what section of the Edit Web Part properties pane this setting will appear in. If not specified, the custom property will appear in a Miscellaneous section.

In the file VisualWebPart1UserControl.ascx.cs, add a property to store our custom web part.

SharePoint_Blog_Creating_a_Web_Part_with_Custom_Properties

Now, back in the VisualWebPart1.cs file, alter the CreateChildControls() method to pass this web part into our user control.

SharePoint_Blog_Creating_a_Web_Part_with_Custom_Properties

Now, in the VisualWebPart1UserControl.ascx.cs file, update the code to display the value entered for our custom property in a label we have added to our VisualWebPart1UserControl.ascx file.

SharePoint_Blog_Creating_a_Web_Part_with_Custom_Properties

Now deploy your web part and add it to your page. When we go to edit our web part, we see there is a section called Custom Settings which contains our property.

SharePoint_Blog_Creating_a_Web_Part_with_Custom_Properties

Upon entering text into this field, hitting OK, and saving the page, we will now see our text appear in the label for our web part.

SharePoint_Blog_Creating_a_Web_Part_with_Custom_Properties

 

Fuente:

http://www.thesharepointblog.net/Lists/Posts/Post.aspx?List=815f255a-d0ef-4258-be2a-28487dc9975c&ID=105

Más información:

http://blog.concurrency.com/sharepoint/create-a-custom-web-part-for-sharepoint-2010/

http://allaboutmoss.com/2010/04/05/webpart-development-part-4-creating-custom-web-part-properties/

URL path length restrictions (SharePoint Server 2010)

There is no limit to encoded URLs in SharePoint Server 2010. The limitations are the following:

  • 260 Unicode (UTF-16) code units – the characters in a full file path, not including a domain/server name.
  • 256 Unicode (UTF-16) code units – the characters in a full folder path, not including the file name and the domain/server name.
  • 128 Unicode (UTF-16) code units - characters in a path component, that is, a file or folder name.
  • 260 Unicode (UTF-16) code units – the characters in a full path, including a domain/server name for use with Office clients.
  • 256 Unicode (UTF-16) code units – the characters in a full path including the domain/server name, for use with Active X controls.
Internet Explorer URL length limitations

Internet Explorer also has limitations that are separate from those in SharePoint Server 2010. Even though you make the SharePoint Server 2010 URL path shorter than the limitations, you might experience an Internet Explorer URL length limitation because of added parameters and encoding of the URL. You must use the most restrictive limitation as a guideline for planning URL lengths.

Both Internet Explorer 7 and Internet Explorer 8 have a maximum URL length of 2,083 UTF-8 characters and a maximum path length of 2,048 UTF-8 characters. However, in Internet Explorer 7, under certain circumstances, the effective URL length limitation is 1024 UTF-8 characters, not 2083 UTF-8 characters. For more information about the URL length limits in Internet Explorer, see Microsoft Knowledge Base article 208427, Maximum URL length is 2,083 characters in Internet Explorer (http://go.microsoft.com/fwlink/p/?LinkId=195568&clcid=0x409).

 

Content DB has been deleted from SQL Server but still get an error 'A SharePoint database named ‘….. ‘ already exists'

This happened to me after I tried to restore few sites with their content databases from CA.  The restoration failed but the content DBs were created in SQL Server but were not displayed in CA.  I simply deleted those databases from SQL Server.  Unfortunately, this caused me not being able to create a new content DB with the same name from CA.  The error message was

  • 'A SharePoint database named ‘….. ‘ already exists'

The solution to this problem was to run the following script on the SharePoint_Config database

  • Delete FROM Objects WHERE Name = 'name of the ghost db'

Instalar REST en Sharepoint 2010

wanted to use the new REST services in SharePoint 2010. But when I navigated to the ListData.svc service. I got the following error:

Screenshot displaying SharePoint 2010 showing the following error: "Could not load type 'System.Data.Services.Providers.IDataServiceUpdateProvider' from assembly 'System.Data.Services, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'."

First I checked if there was a System.Data.Services entry in the Global Assembly Cache (GAC). There was one with version 3.5.30729.1. So it wasn’t a case of a missing file.

Obtener un term de metadata Sharepoint 2010

Obtener una referencia al término “Newsfeed”
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Taxonomy")
$site = Get-SPSite http://portal.sharepoint.com
$session = New-Object Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
$termStore = $session.TermStores["Connection to: Managed Metadata Service"]
$group = $termStore.Groups["MyTerms"]
$termSet = $group.TermSets["Features"]
$terms = $termSet.GetTerms(100)
$term = $terms | ?{$_.Name -eq "Newsfeed"}

SharePoint Configuration Cache

1.What is SharePoint Configuration Cache?

The config cache is where we cache configuration information (stored in the config database) on each server in the farm.  Caching the data on each server prevents us from having to make SQL calls to pull this information from the configuration database. It is full of XML files containing configuration objects.  The SharePoint configuration cache is where configuration information from the SharePoint configuration database is stored on each server in the farm.  Caching the data from the config database as XML files on the web front ends and application servers prevents multiple calls to SQL Server thus improving performance.  This is a feature in WSS & MOSS 2007 as well as SharePoint 2010.

There is a timer job called “Config Refresh” that updates the cache on SharePoint servers in the farm. Like any other cache, config cache becomes stale over time. Therefore, clearing the cache is needed to get all the SharePoint servers up to date on the latest farm information

Sometimes this cache can become corrupted. This issue can come up when developing timer job definitions . These definitions use this cache, so everytime you deploy new versions of the assemblies, you’ll have to clear the cache.  Also, when the cached data becomes out of sync with what’s in the configuration database, timer jobs may start failing.  This will occur if the contents of the file system cache on the front-end servers are newer than the contents of the configuration database, so after you perform a system recovery you may have to manually clear the file system cache on a server as well.  Another of the reasons your cache could be out of sync is if the Timer service on your servers was stopped or failed unexpectedly.

 

Host header for Web application Sharepoint 2010

 

Host header (aka domain names or host names) let you assign more than one site to a single IP address on a IIS Web server. In SharePoint context, may you need individual host-named such as http://thuansoldier.net instead of http://thuansoldier/.

When you create new Web application and then create new site collection, you will make difficulties  for end user. They don’t want complicated URL with port number. In this post, I will configure host header via DNS and IIS 7.5. in order to facilitate URL of Web application.  All of them are visual but you can use Windows PowerShell to do this rapidly.

Create new Web application

Open Central Administration > Application Management > Manage web applications (under Web Applications). Click New in Ribbon.

I will select Classic Mode Authentication because I haven’t configured Kerberos yet for fully configuring Claim-based Authentication. Under Name, you can type name of Web application. You should name it simply to remember and manage.  Please notice under Port and Host Header. Because I want to facilitate URL for end-user thus I select port 80. I continue to type URL: portal.ict24h.net.

Copiar los items de una lista a otra Sharepoint 2010 Server Object

 

image

Más información:

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.aspx

Copiar una libreria de SharePoint library usando PowerShell

  1. Export-SPWeb -Identity http://sp.christianazcon.com.ar -Path "D:\Backup\Libreriabak.dat" -ItemUrl "/Shared%20Documents"
  2. Import-SPWeb -Identity http://sp.christianazcon.com.ar/Test -Path "D:\Backup\Libreriabak.dat"

Determinar que proceso del w3wp es un servicio de Sharepoint

SharePoint runs its service applications on IIS application pools, which in turn creates multiple w3wp processes running on your servers. When looking at Task Manager, you will see a long list of w3wp processes. Similar to

Task Manager Processes List

As you can see in my example above, most of my w3wp processes are using unique accounts, so I can quickly look at this list and know what process belongs to which service account. Per Microsoft’s recommendations for installing SharePoint, using a unique account per service is preferred, and this is one of the benefits.

Using a SharePoint List as a Data Source in SQL Server Reporting Services 2008 R2

Create a Data Source

When building a report that uses data in a SharePoint list, the Data Source Connection String property must be set to the URL of the SharePoint site or subsite that contains the list you want to use in your report. Right click on the Data Sources node in Report Data and select Add Data Source from the popup menu. Fill in the Data Source Properties General tab as shown below (specify the URL in the Connection string for your SharePoint site or subsite):

the Data Source Connection String property must be set to the URL of the SharePoint site or the subsite

Click on Credentials and fill in the dialog as shown below:

Click on Credentials and fill in the dialog

Clase SPSiteDataQuery

Represents a query that can be performed across multiple lists in multiple Web sites in the same Web site collection.

You can use an instance of this class to retrieve data from selected lists or from all lists in the current site collection. Specify the scope of the query by setting the Websproperty. Specify the lists to participate in the query by setting the Lists property and the fields to return by setting the ViewFields property. Control data selection and order by setting the Query property.

To execute the query, pass the SPSiteDataQuery object to the GetSiteData(SPSiteDataQuery) method, which returns a DataTable object containing rows of data that represent the result of the query. Each DataRow object in the DataTable.Rows collection represents a single item that satisfies the query. Each DataColumn object in theDataTable.Columns collection represents a field that is requested in the ViewFields property, and the column name equals the value of the Name attribute for that field. In addition, the data table contains a column named WebId, which identifies the Web site that contains each item, a column named ListId, which identifies the list that contains each item, and a column named ID, which identifies each item.

 

Crear una página custom de error Sharepoint 2010

Locate and copy the error.aspx file in Layouts folder of the 14 Hive (%PROGRAM FILES%\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS).

Create a new folder in the Layouts folder (ex. CustomError) and then paste the copied error.aspx file more the next content.

Set-SPCustomLayoutPage -Identity Error -RelativePath “/_layouts/CustomError/error.aspx” -WebApplication <webappURL>

The perform un iisreset.

 

At any point, you can set the error page back to the default by running the following command and then IISRESET:

Set-SPCustomLayoutPage -Identity Error -WebApplication <webappURL> -Reset

 

Más información:

http://www.tcscblog.com/2012/02/10/custom-error-page-with-log-support-ticket-link-for-sharepoint-2010/

Obtener el lenguaje de la UI via jquery o javascript

 
alert(_spPageContextInfo.currentLanguage);

Setear el lenguaje para un usuario:


<button onclick="OnSelectionChange(1036)"> French </button>
<button onclick="OnSelectionChange(1033)"> English </button>

Más información:
http://techtrainingnotes.blogspot.com/2010/10/sharepoint-2010-playing-with.html
 

Sharepoint 2010–Orden correcto de instalación

  1. SharePoint 2010 RTM + SP1 (slipstreamed)
  2. Configure Farm using PowerShell
  3. Office Web Apps RTM + SP1 (slipstreamed)
  4. Run SharePoint Config Wizard (PSConfig) on all severs
  5. SharePoint 2010 Server Language Pack RTM + SP1 (slipstreamed)
  6. Run SharePoint Config Wizard (PSConfig) on all servers
  7. Install OCT 2011 CU (or current recommended CU)
  8. Run SharePoint Config Wizard (PSConfig) on all servers

Additional Note: Sometimes after installing CU’s I’ve noticed errors when trying to run the SharePoint Products Configuration Wizard (PSConfig), like in the screenshot below. In my case the PSConfig wizard was complaining about missing language packs and the CU files, which I could confirm had been installed properly and there before installing the CU. To fix this, I simply forced PSConfig through PowerShell – avoiding the GUI – and it worked like a charm!

psconfig.exe -cmd installcheck -noinstallcheck

There's also IISRESET and rebooting your servers as potential fixes too.

Enable folder creation on a list in Sharepoint

 
PS > $spWeb = Get-SPWeb http://sp01/site
PS > $spList = $spWeb.GetList ("http://sp01/site/Lists/MyList")
PS > $spList.EnableFolderCreation = $true
PS > $spList.Update()
 
Más información:
http://blog.falchionconsulting.com/index.php/2009/07/setting-list-properties-using-stsadm/
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.enablefoldercreation.aspx
http://bytes.com/topic/net/answers/867481-trying-create-folder-programatically-doc-library-sharepoint-site
 

Word Web App cannot open this document for viewing because of an unexpected error (Word Web App no puede abrir este documento por un error inexperado)

I encountered this error on a newly created site collection

Word Web App cannot open this document for viewing because of an unexpected error. To view this document, open it in Microsoft Word.

image6

One look in SharePoint log files with ULS viewer did not reveal much:

w3wp.exe (0x1A74)    0x22F4    Office Web Apps    Office Viewing Architecture    b4vn    Medium    Conversion response received: CantFindSourceDocument    41e96340-f0a6-4b66-b471-83b9d2026d61

 

SharePoint Server 2010–Todas las versiones hasta el 02/12

Microsoft SharePoint Server 2010
Release Version KB Download
RTM 14.0.4762.1000
June 2010 CU 14.0.5114.5003
Aug 2010 CU 14.0.5123.5000
Oct 2010 CU 14.0.5128.2003
Dec 2010 CU 14.0.5130.5002
Feb 2011 CU 14.0.5136.5002
April 2011 CU 14.0.5138.5001
Service Pack 1 14.0.6029.1000
June 2011 CU 14.0.6106.5000
June 2011 CU (Refresh) 14.0.6106.5002
August 2011 CU 14.0.6109.5002
October 2011 CU 14.0.6112.5000
December 2011 CU 14.0.6114.5000

Logging in SharePoint

SPDiagnosticsService.Local.WriteTrace(0, new

SPDiagnosticsCategory(“My category”,

TraceSeverity.Unexpected, EventSeverity.Error),

TraceSeverity.Unexpected, ex.Message, ex.StackTrace);

 

Your solution might have the minium log level set to higher than “Information” and your entry will not be written if your log level is set too low

If your application is running on one of the front-end Web servers in the farm, the property LOCAL returns an instance of the SPDiagnosticsService class. If an instance of the service does not exist, when you access this property, an instance is created on the local server and the change propagates to all servers in the server farm.

If you are not connected to a front-end Web server in the server farm, the property returns Nothing.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spdiagnosticsservice.aspx

miércoles, 15 de febrero de 2012

Identify and clean up orphan sites in sharepoint

A continuación busco los sitios huerfanos que tengan PWA como URL:

 

select distinct a.Path, b.name as databasename,a.ApplicationId, b.id as dbid, a.Id

from

[SharePoint_Config].dbo.sitemap as a inner join

[SharePoint_Config].dbo.objects as b on a.databaseid=b.id inner join

[SharePoint_Config].dbo.objects as c on c.id=a.applicationid inner join

[SharePoint_Config].dbo.objects as d on b.parentid=d.id inner join

[SharePoint_Config].dbo.objects as e on d.parentid=e.id

WHERE b.name  like '%PWA%'

 

Fuente:

http://social.technet.microsoft.com/wiki/contents/articles/how-to-identify-and-clean-up-orphan-sites-in-sharepoint.aspx

domingo, 12 de febrero de 2012

SharePoint SandBox Solution Execution process

Sandbox Solutions  ==  user solutions

It  is a new feature introduced in SharePoint 2010

Sandbox is a secured wrapper and it has restrictions on code to run in SharePoint environment

Sandbox solution assembly (dll) will be deployed to content database

farm solution assembly (dll) will be deployed(Assembly target type) to GAC (Assemblies run with full trust by default. They are globally installed, so they will work in any Web application)  or Web Application (bin – cas policies , tends to available in only one web app)

Physical location of GAC files  click  Start | Run and type in “c:\windows\assembly\

SandBox Sol can access  only data within site collection

  • Can be uploaded by site collection administration, so no need of farm administrator to install the solution and they can view the resource utilization of each solution and can block if it consumes too much resources. Usually when sites working slow, developers complain the server is slow whereas site/server administrators blame on Develepor code/solutions.
  • Technically speaking SharePoint solutions run in seperate worker processes and not in w3wp.exe. So It doesn’t require IIS Reset or Application Pool Recycling. Without disturbing the SharePoint site, Sandbox solutions can be deployed. Only thing while deploying new version of Sandbox solution over existing solution, SharePoint will display No Solution found error in Sandbox Webparts on the page. However within seconds sandbox solutions getting deployed and it’ll start working.

Renombrar Servidor de Sharepoint

 

1. Usar Rename-SPServer (http://technet.microsoft.com/en-us/library/ff607556.aspx)

2. Pero si se ha renombrado el server por eje: en el caso de máquinas virtuales clonadas

Solución:

1.Asegúrese de que usted es un miembro del grupoAdministradores local en el equipo local para poder ejecutar Stsadm.

2.En la unidad donde está instalado SharePoint Server 2010,vaya al directorio siguiente: %COMMONPROGRAMFILES%Microsoft sharedWeb server extensions14Bin.

3.Escriba el siguiente comando y, a continuación, presione ENTRAR: stsadm -o renameserver -oldservername <oldServerName> -newservername <newServerName>

Nota:
No se recomienda el uso de Rename-SPServer cmdlet, ya que no funcionará si el servidor en el que se almacena la base de datos de configuración que ya se ha cambiado el nombre.

And when you run PowerShell on your server you get the following error: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.

Recordar  cambiar Alternate Access Mappings

Más información:

http://technet.microsoft.com/en-us/library/cc261986.aspx

Display the sandboxed solutions service configuration settings

You can use this procedure to display the tiers that have been configured for the sandboxed solutions service and to display the worker processes, application domains and other properties that are currently configured for each tier. You can append this script to the script in the previous procedure, or you can use it as a stand-alone script.

#Loop through and show the user what exactly has been created

$uc=[Microsoft.SharePoint.Administration.SPUserCodeService]::Local

Write-Host "The following tiers have been created"
Write-Host "***********************************************************"

foreach($tier in $uc.Tiers)
{      Write-Host "Tier Name: $($tier.Name)"      Write-Host "Tier MaximumWorkerProcess: $($tier.MaximumWorkerProcesses)"      Write-Host "Tier MaximumConnectionsPerProcess: $($tier.MaximumConnectionsPerProcess)"      Write-Host "Tier MaximumAppDomainsPerProcess: $($tier.MaximumAppDomainsPerProcess)"
Write-Host "Tier PriorityPerProcess: $($tier.PriorityPerProcess)"      Write-Host "Tier ResourceMaxValue: $($tier.ResourceMaxValue)"      Write-Host "***********************************************************"
}
 
Más información:
http://technet.microsoft.com/en-us/library/hh230317.aspx

Esquema Regional Settings

El esquema Regional Settings se usa para definir las zonas horarias, las configuraciones locales, los idiomas y las monedas de una implementación de SharePoint Foundation. Este esquema se expresa principalmente mediante dos archivos ubicados en el directorio de instalación, a saber, RGNLSTNG.XML (%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\1033\XML) y TIMEZONE.XML (%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\CONFIG).

Actualizar manualmente la definición horaria:

http://support.microsoft.com/kb/943663

Actualizar manualmente el período de horario de verano de una definición de zona horaria:

http://support.microsoft.com/kb/888253/es

Más información:

http://msdn.microsoft.com/es-es/library/aa979616.aspx

Remover base de datos de Servicios renombradas

Renombrar bases de datos de servicios:

http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=233

http://technet.microsoft.com/en-us/library/ff851878.aspx

Renombrar bases de contenido

http://blogs.technet.com/b/wbaer/archive/2008/06/16/renaming-content-databases.aspx

Renonbrar bases de Sharepoint

http://blogs.technet.com/b/seanearp/archive/2009/03/14/renaming-crazy-sharepoint-database-names.aspx

Cuando se han renombrado las bases de datos, pueden seguir apareciendo como bases de datos de Sharepoint pueden chequearse en http://central_admin_url/_admin/DatabaseStatus.aspx.

Para borrar esas bases de datos, puede hacerlo con powershell:

# check to ensure Microsoft.SharePoint.PowerShell is loaded

$snapin = Get-PSSnapin | Where-Object {$_.Name -eq

'Microsoft.SharePoint.Powershell'}

if ($snapin -eq $null) {

Write-Host "Loading SharePoint Powershell Snapin"

Add-PSSnapin "Microsoft.SharePoint.Powershell"

}

Get-SPDatabase | Where{$_.Exists -eq $false} | ForEach {$_.Delete()}

Instalación de Sharepoint–Cuentas locales

Al instalar una instancia de Sharepoint y SQL Server en un mismo servidor, en el momento de la configuración con PSCONFIG, nos lanzará el siguiente error al agregar una cuenta de farm.

The specified user xxxx\yyy is a local account. (el usuario especificado es una cuenta local)

Local accounts should only be used in stand alone mode. (cuentas locales deben usarse en mode stand alone)

Solución:

  1. New-SPConfigurationDatabase
  2. Cargo los datos indicados

Enable ASP.NET Session State on SharePoint 2010 Application

Hace un tiempo escribí un post del Objeto  Session:

http://todosharepoint.blogspot.com/2012/01/sharepoint-2010-objecto-session.html

ASP.NET Session state is disabled by default in SharePoint 2010 installation. Although it may not require in typical SharePoint 2010 installations, there may be need in custom solutions & web parts built on top of SharePoint 2010 framework where developers required persisting information per user session.

How really ASP.NET Session State works in SharePoint?

As many of you are aware, ASP.NET allows persisting session states in three different medium – on server memory as a inproc which would require server & load balancer affinity, on SQL Server to persist session in database, or on Session State Server to persist session on dedicated server memory. Both SQL Server and Session State Server would support server farm environment and because SharePoint is the multi-server farm environment based on ASP.NET framework, by default, it can be enabled to use SQL Server and SqlSessionStateStore provider to persist session state.

Should I really worry if ASP.NET Session State is enabled on my SharePoint farm?

It depends on many factors like how many concurrent users will be accessing site or heavy vs. average vs. low usage of session objects. If you really need to persist user session information and if you can store them in other mediums like cookies, ASP.NET Session state may not be necessary. Since SharePoint is built on top of ASP.NET framework, ASP.NET Session state would be ideal place to persist user sessions. Since ASP.NET Sessions gets stored in the SQL Server, heavy usage of session state may require detailed database planning, regular truncating/maintenance/cleanup of expired session state data, or fine tuning of default 60 minute session expiration time. Great thing about this service is even though it’s enabled on whole farm, it’s not used unless specific application is activated to use session state and you have full control & visibility of how ASP.NET sessions gets stored in SharePoint.

How do I enable ASP.NET Session State in SharePoint?

ASP.NET Session state is available to the SharePoint environment by enabling “SharePoint Server ASP.NET Session State Service” service application on the SharePoint farm. You can’t enable this service application using central administration browser interface. You must enable it using PowerShell command.