Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Session Issues 1

Status
Not open for further replies.

BHaines

Programmer
May 29, 2003
100
US
I've been developing a web-based application revolving around a SQL dB, and up until last week, it was working just peachy. However, within the last week, it seems to have entirely ceased to be able to initiate a session. The app needs to start a session, to gather some session info based on a stored procedure. Sessions continue to start all right for another app on the same server, which retrieves the info needed from the stored procedure without incident. If I go to this page, then back to my app, the session is maintained and the app works. If I close out of the browser, and come back into my app fresh, it pulls up SQL errors which we've narrowed down to the missing session variables. The code on this app, and the one that is working, regarding session is identical. Both have @ENABLESESSIONSTATE = True and Response.Buffer = True. Does anyone have any idea why this is happening and how to fix it? I've searched all over the web for any clue, and consulted with another developer, and there don't seem to be any answers.
 
hm...perhaps for some odd reason your session timouts are set to "x" minutes. Check to see for how long the server is set to keep the sessions.
Also u might want to manually decalre the session timeout
by:
<%= Session.Timeout = 10 =%>
(10 minutes)
and see how it responds then....that is what I can think of from the top of my head. Have you applied any new updates/pathces on server? Have you used any IIS-lock-security-tools?
give it a try
good luck!
 
I've tried it with Session.Timeout set anywhere from 30 to 240 minutes, and it still does the same thing. The default in our global.asa Session Onstart is 30 minutes. The problem isn't one of timing out, its one of never opening the session to begin with from what I can tell. If I go to the other application (same server, same directory, different subfolder) a session opens with no problem, and it maintains if I then go to the malfunctioning application, allowing it to work.

The only update to any of our servers I know of was an update to SQL 2000 on a totally unrelated server which nothing in my app accesses. The one mine uses is still on SQL 6.5. Regardless of any patches or updates, what affects my Research App should also effect the app which is still working fine, as they're hosted on the same server and access the same stored procedure, correct?
 
yes that is what I would imagine...the other thing I can think of would be the ASP -VBscript u have on the paticualr page that is calling the procedure...perhaps some locking happens
------------snip from: : ------------
Lock and Unlock
You can lock an application with the &quot;Lock&quot; method. When an application is locked, the users cannot change the Application variables (other than the one currently accessing it). You can unlock an application with the &quot;Unlock&quot; method. This method removes the lock from the Application variable:

<%
Application.Lock
'do some application object operations
Application.Unlock
%>
----------------snap----------------------------

but it is strange...I know that some updates for IIS would overwrite GLobal.asp &quot;for security&quot; and distroy the sessions or reset them...but that doesnt seem to bee the case.
if all ur attempt fail to get The Answer post your Q at there is a few people overthere that have much more experience than me.
this is all I can think of...sorry for nor being much of a help
good luck
 
Thanks Lebisol, although you're answer wasn't the exact issue, it made me look at the stored procedure/application and the permissions to that rather than focusing on the Session itself. Permissions had been removed from my app to the stored procedure. Once restored, it worked fine again. Thanks!
 
great!
Glad to hear that...as long as the problem is solved :D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top