私はデータベースを共有ホスティングによって提供しています。私は、SQL Serverのセッションを保存したいが、それは私にエラーを与える:Asp.Net 4.0 SqlServerでのセッションの保存
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
私のWebConfigは、次のステートメントが含まれます。
<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"/>
私はaspnet_regsql.exe
を実行しました。それはそれがaspNret_TableNames
を作成した後、サーバーとログインの詳細について私に尋ねた。
私をご案内ください。
は、私が低下した今、それを使用して、私はあなたのソリューション –
ねえ悪魔、素晴らしいソリューション:))あなたはちょうど私の一日保存した –
に試してみることでしょう! –