Asp.Net 4.0 Stockage de Session dans sql server

J'Ai de la Base de données fournies par l'hébergement partagé. Je veux stocker la session dans sql server, mais il me donner l'erreur:

Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above
[HttpException (0x80004005): Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above.]
System.Web.SessionState.SqlPartitionInfo.GetServerSupportOptions(SqlConnection sqlConnection) +2147087
System.Web.SessionState.SqlPartitionInfo.InitSqlInfo(SqlConnection sqlConnection) +107
System.Web.SessionState.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo, TimeSpan retryInterval) +531
System.Web.SessionState.SqlSessionStateStore.GetConnection(String id, Boolean& usePooling) +237
System.Web.SessionState.SqlSessionStateStore.CreateUninitializedItem(HttpContext context, String id, Int32 timeout) +136
System.Web.SessionState.SessionStateModule.CreateUninitializedSessionState() +50
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +659
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +96
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Mon WebConfig inclure la Déclaration Suivante.

    <sessionState mode="SQLServer"
cookieless="true"
regenerateExpiredSessionId="true"
timeout="30"
allowCustomSqlDatabase="true"
sqlConnectionString="Data Source=hostingServer;Initial         catalog=MyDatabase;User Id=MyUser;password=MyPassword;"
stateNetworkTimeout="60"/>

J'ai couru aspnet_regsql.exe. Il m'a demandé sur le serveur et de connexion de détails après qu'il a créé aspNret_TableNames.

Merci de me guider.

OriginalL'auteur Amritpal Singh | 2011-09-12