473,763 Members | 7,622 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQLServer Session State

Hi,
I am having a problem with my session state through sql server. This
used to work, then all of a sudden (the only change was setting up
replication in the sqlserver database) it stopped working.

I ran uninstallsqlsta te.sql after stopping w3svc and then restarted
the w3svc and rean installsqlstate .sql. This works fine on my machine
and my session variables work again....but I'm an administrator on the
database. I go to another user, and I get execute permission problems
on ASPState database stored procedures:
TempGetAppId
TempInsertState ItemShort
TempInsertState ItemExclusive

I have never had to give permissions on the ASPState database before.
But I went ahead and tried giving permissions on these stored
procedures. Now nothing works, my link going into my asp.net page no
longer works. It just tries forever to open the page and comes back
with web service not available.

So I uninstall and reinstall the ASPState database as done before, and
same problem, permissions, give permissions, locking up. I seem to be
at a standstill.

I'm using sqlserver 2000. Any ideas would be GREATLY appricated since
I no longer have any ideas on how to fix this.

Thanks
Julie Barnet
Nov 18 '05 #1
1 2689
okay here it goes... installsqlstate uses tempdb to store session state
info.
now why would you want replication on tempdb ? (plus it adds a guid column
to all tables. This could potentially break your stored proc.
there is another set of scripts which creates a seperate db for sql server
session state.
use that script..
(from msdn)
How is the database created? ASP.NET provides two pairs of scripts to
configure the database environment. The scripts in the first pair are named
InstallSqlState .sql and UninstallSqlSta te.sql and are located in the same
folder as the session state NT service. They create a database called
ASPState and several stored procedures. The data, though, is stored in the
SQL Server temporary storage area-the TempDB database. This means that the
session data is lost if the SQL Server machine is restarted.

To work around this limitation, use the second pair of scripts. The names of
the scripts are InstallPersistS qlState.sql and UninstallPersis tSqlState.sql.
In this case, an ASPState database is created, but its tables are created
within the same database and as such are persistent. When installing the SQL
Server support for sessions, a job is also created to delete expired
sessions from the session-state database. The job is named
ASPState_Job_De leteExpiredSess ions and runs every minute. Note that the
SQLServerAgent service needs to be running in order for the job to work.

http://msdn.microsoft.com/library/de...ssionstate.asp

if you do want replication across the db (make sure you do a compare between
the user rights and the structure of objects (tables / stored procs) before
an after settting the replication
--
Regards,

HD
Once a Geek.... Always a Geek
"Julie Barnet" <ba*****@pr.fra serpapers.com> wrote in message
news:43******** *************** ***@posting.goo gle.com...
Hi,
I am having a problem with my session state through sql server. This
used to work, then all of a sudden (the only change was setting up
replication in the sqlserver database) it stopped working.

I ran uninstallsqlsta te.sql after stopping w3svc and then restarted
the w3svc and rean installsqlstate .sql. This works fine on my machine
and my session variables work again....but I'm an administrator on the
database. I go to another user, and I get execute permission problems
on ASPState database stored procedures:
TempGetAppId
TempInsertState ItemShort
TempInsertState ItemExclusive

I have never had to give permissions on the ASPState database before.
But I went ahead and tried giving permissions on these stored
procedures. Now nothing works, my link going into my asp.net page no
longer works. It just tries forever to open the page and comes back
with web service not available.

So I uninstall and reinstall the ASPState database as done before, and
same problem, permissions, give permissions, locking up. I seem to be
at a standstill.

I'm using sqlserver 2000. Any ideas would be GREATLY appricated since
I no longer have any ideas on how to fix this.

Thanks
Julie Barnet

Nov 18 '05 #2

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

Similar topics

1
2463
by: quique | last post by:
Hi all, I want to know the advantages and disadvantages of the methods of maintain session state, obviously if i choose sqlserver is the most robust but the less performace.. If wan't to maintain session state in sqlserver, Does anybody knows when it's saved to database?, on beguinSession, on endSession... <sessionState
6
1351
by: A | last post by:
Hi, does anybody know how (if possible) to change the database name for the session database (which is ASPState)? My problem is that our website/sqlserverdb is hosted by an isp, and we are not alone (on the server) Regards,
4
4006
by: John Q. Smith | last post by:
I'm trying to find out some of the details behind OOP state management with SQL Server. For instance - how long does the session object live on any server? Is it created and destoyed with each page request? - will each reading of a session variable cause a round trip to the DB server? or does the complete session live within the HttpContext object? - when asp.net session state is enabled (in any mode), after a session has been created,...
8
8418
by: karahan celikel | last post by:
I realized that when SqlServer mode is used for session management Session_End event is not fired in global.asax. What can I do if I want to do something when a user's session end? Thanks
0
1023
by: Jeff Carver | last post by:
I've been experimenting with SQLServer session state, and I'm puzzled by something. When I use Session.SessionID to display the session ID, I get a 24-character string, e.g.: ayzuglzyznc4o4eplcu1h2bj The corresponding database value (ASPState.ASPStateTempSessions.SessionID) is a 32-character string which equates to the 24-character Session.SessionID value plus "00000001":
1
2636
by: Chris Snyder | last post by:
Hello all. I have a problem that is probably failry easy to solve, but I don't know where to look. (Or, really, what to look for.) My customer has a tool (written in .NET) that encrypts strings. They require us to use the tool to encrypt the connection strings to the "real" database. We have had no problem with that. However, they also want to use SQL Server to manage session state, and would really like the ConnectionString to the...
2
1274
by: Kishore Gopalan | last post by:
Hi, Is there a set of APIs that would let me access the tables where ASP.NET stores the state when in SQLServer mode. Thanks. Kishore
1
1517
by: Jamie Schatte | last post by:
We have two ASP.NET 2.0 websites, both running on the same production web server. One website uses SQLServer mode for session state with no problems. However, although the other website works great when we use InProc session state, when we change to SQLServer mode for this website, it does not work--session variables are not retained page to page (and no errors are raised indicating a problem). The second website is using the same...
3
3461
by: Moe Sisko | last post by:
Using dotnet 2.0 sp1, I've got ASP.NET session state working ok in SQLServer mode, but the sessions never seem to expire. e.g if I add a timeout attribute like so : <sessionState mode="SQLServer" sqlConnectionString="Integrated Security=SSPI;data source=localhost" timeout="1" >
0
9564
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10148
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...
1
9938
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
9823
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
6643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2794
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.