Session state issues

  • Thread starter Thread starter RahulBose
  • Start date Start date
R

RahulBose

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.ThrowSqlConnectionException(SqlConnection
conn, Exception e) at
System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo
sqlPartitionInfo) at
System.Web.SessionState.SqlSessionStateStore.GetConnection(String id,
Boolean& usePooling) at
System.Web.SessionState.SqlSessionStateStore.ResetItemTimeout(HttpContext
context, String id) at
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object
source, EventArgs e, AsyncCallback cb, Object extraData) at
System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep 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.GetConnection(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) at
System.Data.SqlClient.SqlConnection.Open() at
System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo
sqlPartitionInfo)

Has anyone faced a similar type of problem?

Thanks a lot.
Rahul
 
Back
Top