Si ha configurado SQL Server como repositorio para las sesiones de ASP.NET puede que se le despliegue este error Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server, esto se debe a que la cuenta con la cual está ejecutando el Application Pool del sitio en ASP.NET no tiene derechos sobre la base de datos en SQL Server, para configurarlo ejecute las siguientes instrucciones, recuerde cambiar la identidad del usuario por el usuario que tiene configurado en su IIS.

 

use ASPState

go

grant EXECUTE on GetHashCode to [ApplicationPoolIdentity]

grant EXECUTE on GetMajorVersion to [ApplicationPoolIdentity]

grant EXECUTE on TempGetAppID to [ApplicationPoolIdentity]

grant EXECUTE on TempGetStateItem to [ApplicationPoolIdentity]

grant EXECUTE on TempGetStateItem2 to [ApplicationPoolIdentity]

grant EXECUTE on TempGetStateItem3 to [ApplicationPoolIdentity]

grant EXECUTE on TempGetStateItemExclusive to [ApplicationPoolIdentity]

grant EXECUTE on TempGetStateItemExclusive2 to [ApplicationPoolIdentity]

grant EXECUTE on TempGetStateItemExclusive3 to [ApplicationPoolIdentity]

grant EXECUTE on TempGetVersion to [ApplicationPoolIdentity]

grant EXECUTE on TempInsertStateItemLong to [ApplicationPoolIdentity]

grant EXECUTE on TempInsertStateItemShort to [ApplicationPoolIdentity]

grant EXECUTE on TempInsertUninitializedItem to [ApplicationPoolIdentity]

grant EXECUTE on TempReleaseStateItemExclusive to [ApplicationPoolIdentity]

grant EXECUTE on TempRemoveStateItem to [ApplicationPoolIdentity]

grant EXECUTE on TempResetTimeout to [ApplicationPoolIdentity]

grant EXECUTE on TempUpdateStateItemLong to [ApplicationPoolIdentity]

grant EXECUTE on TempUpdateStateItemLongNullShort to [ApplicationPoolIdentity]

grant EXECUTE on TempUpdateStateItemShort to [ApplicationPoolIdentity]

grant EXECUTE on TempUpdateStateItemShortNullLong to [ApplicationPoolIdentity]

go

 

<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" stateNetworkTimeout="10" sqlConnectionString="data source=127.0.0.1;Integrated Security=SSPI" sqlCommandTimeout="30" customProvider="" cookieless="UseCookies" cookieName="ASP.NET_SessionId" timeout="20" allowCustomSqlDatabase="false" regenerateExpiredSessionId="true" partitionResolverType="" useHostingIdentity="true" > <providers> <clear /> </providers> </sessionState>

 

Saludos,

 

Ing. Eduardo Castro Martínez, PhD – Microsoft SQL Server MVP

http://mswindowscr.org

http://comunidadwindows.org

Costa Rica

Technorati Tags: SQL Server

LiveJournal Tags: SQL Server

del.icio.us Tags: SQL Server

http://ecastrom.blogspot.com

https://ecastrom.wordpress.com

http://ecastrom.spaces.live.com

http://universosql.blogspot.com

http://todosobresql.blogspot.com

http://todosobresqlserver.wordpress.com

http://mswindowscr.org/blogs/sql/default.aspx

http://citicr.org/blogs/noticias/default.aspx

http://sqlserverpedia.blogspot.com/

Note: Cross posted from Eduardo Castro.

Permalink