SQL Session State

A

Ahmed Hashish

Dear All
I'm trying to use the sql server 2005 to store my web application session variables,
First I modified the web.config as follows:
<sessionState mode="SQLServer"

cookieless="true"

regenerateExpiredSessionId="true"

timeout="60"

sqlConnectionString="Data Source=ServerName\InstanceName;user Id=myuser;pwd=mypwd"

stateNetworkTimeout="60"/>

Second:

I installed the file Windows\Microsoft.Net\Framework\v2.0.50727\InstallSqlState.sql

Third:

The problem that when I tried to run my application an error:

"Cannot open database "ASPState" requested by the login. The login failed.
Login failed for user 'MyUser'"

What Permissions I need to add to that user to allow login to the database?
 
W

Winista

You need to create a user account "MyUser" in SQL server. And make sure that your SQL Server is set for mixed mode authentication.


--
Netomatix
http://www.netomatix.com
Dear All
I'm trying to use the sql server 2005 to store my web application session variables,
First I modified the web.config as follows:
<sessionState mode="SQLServer"

cookieless="true"

regenerateExpiredSessionId="true"

timeout="60"

sqlConnectionString="Data Source=ServerName\InstanceName;user Id=myuser;pwd=mypwd"

stateNetworkTimeout="60"/>

Second:

I installed the file Windows\Microsoft.Net\Framework\v2.0.50727\InstallSqlState.sql

Third:

The problem that when I tried to run my application an error:

"Cannot open database "ASPState" requested by the login. The login failed.
Login failed for user 'MyUser'"

What Permissions I need to add to that user to allow login to the database?
 
A

Ahmed Hashish

I already done this but it gives another error "
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. "

You need to create a user account "MyUser" in SQL server. And make sure that your SQL Server is set for mixed mode authentication.


--
Netomatix
http://www.netomatix.com
Dear All
I'm trying to use the sql server 2005 to store my web application session variables,
First I modified the web.config as follows:
<sessionState mode="SQLServer"

cookieless="true"

regenerateExpiredSessionId="true"

timeout="60"

sqlConnectionString="Data Source=ServerName\InstanceName;user Id=myuser;pwd=mypwd"

stateNetworkTimeout="60"/>

Second:

I installed the file Windows\Microsoft.Net\Framework\v2.0.50727\InstallSqlState.sql

Third:

The problem that when I tried to run my application an error:

"Cannot open database "ASPState" requested by the login. The login failed.
Login failed for user 'MyUser'"

What Permissions I need to add to that user to allow login to the database?
 
A

Ahmed Hashish

It's solved after I made 'myuser' db_owner for the ASPState database

Thanks

I already done this but it gives another error "
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. "

You need to create a user account "MyUser" in SQL server. And make sure that your SQL Server is set for mixed mode authentication.


--
Netomatix
http://www.netomatix.com
Dear All
I'm trying to use the sql server 2005 to store my web application session variables,
First I modified the web.config as follows:
<sessionState mode="SQLServer"

cookieless="true"

regenerateExpiredSessionId="true"

timeout="60"

sqlConnectionString="Data Source=ServerName\InstanceName;user Id=myuser;pwd=mypwd"

stateNetworkTimeout="60"/>

Second:

I installed the file Windows\Microsoft.Net\Framework\v2.0.50727\InstallSqlState.sql

Third:

The problem that when I tried to run my application an error:

"Cannot open database "ASPState" requested by the login. The login failed.
Login failed for user 'MyUser'"

What Permissions I need to add to that user to allow login to the database?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top