Hi,
I am getting the exception "Unable to connect to SQL Server session
database." many a times in my web app. I am dotNet 2 and Sql Server
2005.
(1) I use StateServer, and everything is working fine.
sqlConnectionString="data source=abc_db\abc1;user
id=abcd;password=1234"
I get the following error:
Stack Information : at
System.Web.SessionState.SqlSessionStateStore.Throw SqlConnectionException(SqlConnection
conn, Exception e) at
System.Web.SessionState.SqlSessionStateStore.SqlSt ateConnection..ctor(SqlPartitionInfo
sqlPartitionInfo) at
System.Web.SessionState.SqlSessionStateStore.GetCo nnection(String id,
Boolean& usePooling) at
System.Web.SessionState.SqlSessionStateStore.Reset ItemTimeout(HttpContext
context, String id) at
System.Web.SessionState.SessionStateModule.BeginAc quireState(Object
source, EventArgs e, AsyncCallback cb, Object extraData) at
System.Web.HttpApplication.AsyncEventExecutionStep .System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)
Inner Exception : System.Data.SqlClient.SqlException: Cannot open
database "ASPState" requested by the login. The login failed. Login
failed for user 'abcd'. at
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) at
System.Data.SqlClient.SqlConnection.Open() at
System.Web.SessionState.SqlSessionStateStore.SqlSt ateConnection..ctor(SqlPartitionInfo
sqlPartitionInfo)
Has anyone faced a similar type of problem?
Thanks a lot.
Rahul