473,810 Members | 3,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL Session State

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="tru e"

regenerateExpir edSessionId="tr ue"

timeout="60"

sqlConnectionSt ring="Data Source=ServerNa me\InstanceName ;user Id=myuser;pwd=m ypwd"

stateNetworkTim eout="60"/>

Second:

I installed the file Windows\Microso ft.Net\Framewor k\v2.0.50727\In stallSqlState.s ql

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?

Mar 15 '06 #1
3 12389
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
"Ahmed Hashish" <a_*******@hotm ail.com> wrote in message news:OY******** ******@TK2MSFTN GP12.phx.gbl...
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="tru e"

regenerateExpir edSessionId="tr ue"

timeout="60"

sqlConnectionSt ring="Data Source=ServerNa me\InstanceName ;user Id=myuser;pwd=m ypwd"

stateNetworkTim eout="60"/>

Second:

I installed the file Windows\Microso ft.Net\Framewor k\v2.0.50727\In stallSqlState.s ql

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?

Mar 15 '06 #2
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. "

"Winista" <na*********@ho tmail.com> wrote in message news:u0******** ******@TK2MSFTN GP09.phx.gbl...
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
"Ahmed Hashish" <a_*******@hotm ail.com> wrote in message news:OY******** ******@TK2MSFTN GP12.phx.gbl...
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="tru e"

regenerateExpir edSessionId="tr ue"

timeout="60"

sqlConnectionSt ring="Data Source=ServerNa me\InstanceName ;user Id=myuser;pwd=m ypwd"

stateNetworkTim eout="60"/>

Second:

I installed the file Windows\Microso ft.Net\Framewor k\v2.0.50727\In stallSqlState.s ql

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?

Mar 15 '06 #3
It's solved after I made 'myuser' db_owner for the ASPState database

Thanks

"Ahmed Hashish" <a_*******@hotm ail.com> wrote in message news:uk******** ******@TK2MSFTN GP09.phx.gbl...
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. "

"Winista" <na*********@ho tmail.com> wrote in message news:u0******** ******@TK2MSFTN GP09.phx.gbl...
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
"Ahmed Hashish" <a_*******@hotm ail.com> wrote in message news:OY******** ******@TK2MSFTN GP12.phx.gbl...
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="tru e"

regenerateExpir edSessionId="tr ue"

timeout="60"

sqlConnectionSt ring="Data Source=ServerNa me\InstanceName ;user Id=myuser;pwd=m ypwd"

stateNetworkTim eout="60"/>

Second:

I installed the file Windows\Microso ft.Net\Framewor k\v2.0.50727\In stallSqlState.s ql

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?

Mar 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3663
by: Phil Grimpo | last post by:
I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of these menus are then placed into the page by calling Server.Execute(rs_Modules("ModulePath")). This works fine for up to 15 "menus" After that, the session variables that were set (not including those called by Global.ASA) are no longer set. ...
3
6047
by: Nhi Lam | last post by:
Hi, I understand that there are 3 modes in which I can configure the SessionStateModule. What I need is an out of process Session State store with fail over support. The "SQL Server Mode" seems to be it, but I heard there is quite a bit of degradation in performance for using this mode. My next option is the "State Server Mode". However, this mode does not give me the fail over support. Is there anything that I can do the enhance the...
2
2195
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the relevant criteria ? is the primary criteria max expected total storage size (for all active sessions) versus max ram available on the state-server machine ? if ADO.NET objects (such as small DataTables) must be stored in session-state , is any...
1
2418
by: Johan Nedin | last post by:
Hello! I have a problem with SQLSession state on my ASP.NET pages. SQLSession state behaves very different from InProcess session state, which I think is very bad. I can understand some of the differences, e.g that every object you store in SQLSession state have to be serializable, but other differences are very unfortunate.
10
3522
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much more time I have on a session? If I do a refresh, does reset the session clock? Do you have have to go to another page to reset the session timeout or will a postback also do it? This is important as we have a few pages that a user
9
5320
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of copy paste (I hear this will improve in ASP.Net 2 via master pages). When I navigate from one page to the next the header and footer user controls lose their state because they are effectively different instances of the user control. Is there...
5
548
by: Sean | last post by:
Problem with sessions I have created an application without concern for sessions. As it turns out I think that might be my undoing. What I have: I have an online quiz. I don’t need to know users or save any data. If the application crashes or user exits the program they should simply start again. Pretty basic. All interactions are stored in an array (not much going on to save to a
18
3450
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that File-New-Window creates an instance of IE in the same process with the same SessionID as the parent window is in big trouble. This fundamentally restricts the usefullness of using session state management. I probably missed it somewhere - can...
11
3663
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each method has the WebMethodAttribute.EnableSession set to true. When I run the test page the session is maintained. However, using a console application, in between setting the string value and attempting to
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10644
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10393
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10124
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.