473,667 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New Session with each page change

I can not persist a Session across page changes. I have it configured
as follows:

* VS .NET 2002
* [machine.config]
<pages buffer="true" enableSessionSt ate="true" enableViewState ="true"
enableViewState Mac="true" autoEventWireup ="true"/>

<sessionState mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424" stateNetworkTim eout="10"
sqlConnectionSt ring="data source=127.0.0. 1;user id=sa;password= "
cookieless="fal se" timeout="20"/>
* [web.config]
<sessionState mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424" sqlConnectionSt ring="data
source=127.0.0. 1;user id=sa;password= " cookieless="fal se"
timeout="20"/>

* enableSessionSt ate is True for all pages.

* All pages use ADO.NET.

I observe that Global.Session_ Start is called with every page switch,
so I assume a new Session object is being created; however, each new
Session object is created with the same SessionID. This happens
whether cookieless is true or false.

Is there anything else I should look for? Could ADO.NET be conflicting
somehow? Is this a known VS.NET 2002 issue?

Thanks,

Tim

Nov 19 '05 #1
1 1456
A new Session object is created when you open the browser, and that same one
is used until the browser is closed. Global.Session_ Start is called when the
Session is started, not each time a page is requested. If you are looking
for an event that is called each time a page is requested, you want
Global.Applicat ion_BeginReques t. If you are looking for a way to end the
current session and start a new one without closing the browser, try looking
at Session.Abandon (). Hopefully something here will help you. Good Luck!
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Tim F" <go****@reliant companies.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
I can not persist a Session across page changes. I have it configured
as follows:

* VS .NET 2002
* [machine.config]
<pages buffer="true" enableSessionSt ate="true" enableViewState ="true"
enableViewState Mac="true" autoEventWireup ="true"/>

<sessionState mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424" stateNetworkTim eout="10"
sqlConnectionSt ring="data source=127.0.0. 1;user id=sa;password= "
cookieless="fal se" timeout="20"/>
* [web.config]
<sessionState mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424" sqlConnectionSt ring="data
source=127.0.0. 1;user id=sa;password= " cookieless="fal se"
timeout="20"/>

* enableSessionSt ate is True for all pages.

* All pages use ADO.NET.

I observe that Global.Session_ Start is called with every page switch,
so I assume a new Session object is being created; however, each new
Session object is created with the same SessionID. This happens
whether cookieless is true or false.

Is there anything else I should look for? Could ADO.NET be conflicting
somehow? Is this a known VS.NET 2002 issue?

Thanks,

Tim

Nov 19 '05 #2

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

Similar topics

1
7781
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains: ---------------------------------------------------------------------------- <?php ini_set("session.use_cookies", "off"); ini_set("session.use_trans_sid", "on"); session_start(); $_SESSION = ""; $_SESSION = ""; echo "<form method='POST' action='login.php'>
27
7111
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate a user from information you got from the session. Each secure app on a site must challenge the user for name and password, each and every time the user accesses it (not just once and then store it in the session). If a secure app is multi-page,...
14
3221
by: Paul Yanzick | last post by:
Hello, I am trying to develop a book tracking application for my capstone in school, and am running into a problem. The application is an ASP.Net application written in C#. The first page you go to is a login form, which will set several session variables with the name used to log in, appropriate security level and some other misc variables, and then will go to a main menu for each particular security level using Server.Transfer. ...
1
737
by: Werner | last post by:
Hi Patrick! Can you give an example of how to use a frameset inside an aspx-file? When I create a new frameset in Visual Studio.Net it just gives me a htm-File. Or give me a link where I can find one? Thanks Werner P.S. Somehow I did not manage to do a followup in Googles newsgroups.
4
15460
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site | Properties | Configuration | Options | Enable Session State Session timeout 20 (3) within Global.asax.vb file - Session_Start subroutine can use Session.Timeout=x minutes or (4) within any web page, i.e., <web page>.aspx can use...
7
1651
by: Mike | last post by:
Hi, I am developing an application with framesets (header, left navigation, and content). Each frameset loads an ".aspx" page, and in one of these pages, I store some information in the Session object, as follows: .... Session = false; ....
2
2125
by: Markus Prediger | last post by:
Hi NG, I have an asp.net project that uses an vb6 com object for some database-manipulation (I cannot rewrite it in .net, sorry, its not my decision). I want it to be instanciated seperately for each session, so that three users can connect to three different databases. But I get crazy because: -With interop all users share one instance - pure chaos (the instance is
1
2960
by: SteveComplex | last post by:
I'm currently working on a project developing a web application that makes heavy use of 3rd-party controls, popup windows and frames ( not my design I hasten to add ). Some of the pages make use of several user controls embedded in a tab control. Needless to say that the page size can be somewhat on the large size, including a lot of information being stored in viewstate. I'm currently looking for a solution to resolve the problem of...
25
6074
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
0
8454
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
8363
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
8883
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
8645
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
7389
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4200
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
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2776
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
1778
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.