473,586 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session resetting

This seems to be related to the ViewState error that is now starting to
plague ASP.Net apps. When the Application Pool is recycled, the Session
seems to be getting reset. When this is done, session information is
lost and my app forgets what rules a user has. I'd rather not recode to
read this from the database for every page, but I wonder if I have no
other choice. Anyone else notice the Session resetting?
Nov 19 '05 #1
3 1752
The ASP.NET worker process recycles for various reasons and it happens more
often that people would expect. You have to design/code for it, including
the possibility of InProc session being lost. To save session, keep it out
of the worker process via the State Server or the Sql DB, or just don't use
Session state which is somtimes possible, depending upon what you're doing.

-Brock
DevelopMentor
http://staff.develop.com/ballen
This seems to be related to the ViewState error that is now starting
to plague ASP.Net apps. When the Application Pool is recycled, the
Session seems to be getting reset. When this is done, session
information is lost and my app forgets what rules a user has. I'd
rather not recode to read this from the database for every page, but I
wonder if I have no other choice. Anyone else notice the Session
resetting?


Nov 19 '05 #2
How do I use State Server or SQL DB?

Once a user is logged in, is there any other way of knowing who they
are? I have a roles (not rules...typo) based system where each role is
assigned various privileges. Certain pages require certain privileges
and so do certain controls.

Thanks.

Brock Allen wrote:
The ASP.NET worker process recycles for various reasons and it happens
more often that people would expect. You have to design/code for it,
including the possibility of InProc session being lost. To save session,
keep it out of the worker process via the State Server or the Sql DB, or
just don't use Session state which is somtimes possible, depending upon
what you're doing.

-Brock
DevelopMentor
http://staff.develop.com/ballen
This seems to be related to the ViewState error that is now starting
to plague ASP.Net apps. When the Application Pool is recycled, the
Session seems to be getting reset. When this is done, session
information is lost and my app forgets what rules a user has. I'd
rather not recode to read this from the database for every page, but I
wonder if I have no other choice. Anyone else notice the Session
resetting?


Nov 19 '05 #3
This is just a setting in the web.config. If you want to use State Server be
sure that the service is running (ASP.NET State Service), if SQL Server is
your choice run InstallSQLState .sql in
windows\Microso ft.NET\Framewor k\VERSION\ once.

HTHs

Daniel
"No One" <ai*******@blah blahblah.com> schrieb im Newsbeitrag
news:kh******** ****@gandalf.gr ey-net.com...
How do I use State Server or SQL DB?

Once a user is logged in, is there any other way of knowing who they are?
I have a roles (not rules...typo) based system where each role is assigned
various privileges. Certain pages require certain privileges and so do
certain controls.

Thanks.

Brock Allen wrote:
The ASP.NET worker process recycles for various reasons and it happens
more often that people would expect. You have to design/code for it,
including the possibility of InProc session being lost. To save session,
keep it out of the worker process via the State Server or the Sql DB, or
just don't use Session state which is somtimes possible, depending upon
what you're doing.

-Brock
DevelopMentor
http://staff.develop.com/ballen
This seems to be related to the ViewState error that is now starting
to plague ASP.Net apps. When the Application Pool is recycled, the
Session seems to be getting reset. When this is done, session
information is lost and my app forgets what rules a user has. I'd
rather not recode to read this from the database for every page, but I
wonder if I have no other choice. Anyone else notice the Session
resetting?



Nov 19 '05 #4

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

Similar topics

8
18749
by: riprod | last post by:
Someone in the IIS newsgroup suggest I post this here, so sorry in advance for the cross posting. I have a Win 2003 SP1 with IIS 6 and host about 40 websites, most of them useing ASP/VB with access databases. The server is a Dell Dual 2.4Ghz XEON with 512Mb Ram. Every few days I get the error 'HTTP/1.1 New Session Failed' and the server...
14
5194
by: Bobby | last post by:
I have this line, at this time the value of Session("Login") is 1: Response.Write "<a href=" & Request("script_name") & _ "?action=show&o=" & rsCustOrders("OrderID") & _ ">" & rsCustOrders("OrderID") & "</a>" Once you click on it, it refreshes the page and goes to the following section, and somehow the value of Session("Login") is 0,...
5
2663
by: Jon Booth | last post by:
I want to write an apsx page that when loaded does not refresh Session.Timeout. It is going to be running in an iframe and refreshing every couple of minutes. example. User has 15 minutes left until session expires. iframe.aspx loads and session still has 15 minutes left. Is this possible? I was trying to grab session.timeout at the...
2
1854
by: Dinkster | last post by:
BackGround: - We are new to ASP - We thought we would experiment with using the session object (in proc) to store a small amount of data. - We get different results when cookieless is set to "true" veses "false". - Our simple test app involved updating a counter that was stored as an item in the Session Object. We allow resetting the counter...
1
1158
by: Mike | last post by:
Hey guys need some help on session state. I'm trying to create an ASP.NET page to add items to it. W.G. if your out there I could still use some help! I'm not quite sure how to get it to work. Page loads User selects a value from a drop down list uses a button to add item into a variable
3
2222
by: usenet | last post by:
Hi all, I've created a custom session handler that saves session data to a MySQL database. If the database server is down, I'd like to fallback to PHP's default session handler (files) until the server comes back up. After calling session_set_save_handler(), is there a way to tell PHP to ignore this setting and revert to temp files for...
6
8595
by: awebguynow | last post by:
I'm writing a pretty complex webapp, that ideally will have 2-3 popup windows, but I am losing my session information when I open a new window. Is there a way to retain or replicate Session information ? I've used <atag with target="_blank". I don't know if using a Window name would have any effect at all. other similar topics: multiple...
2
2793
by: Doogie | last post by:
Hi, We have a page we want to refresh every 30 minutes so that users can get up to date info. The problem is that there is information within the session that we need in each refresh to determine what roles the user belongs to so that we can get the data they need. The page times out because we lose our session info after 20 minutes....
1
7174
by: =?Utf-8?B?TWlrZSBNY0FsbGlzdGVy?= | last post by:
I have not been able to find anything about this problem, so it must be configuration on our server, somehow... What we are observing is on Windows Server 2003/IIS 6 our AJAX UpdatePanels are not resetting the IIS Session timer. Thus, if the default IIS Session Timeout of 20 minutes is used, our logged-in users are always receving Session...
0
7911
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...
0
7839
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...
1
7954
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...
0
8215
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...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3836
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...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
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

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.