473,830 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session Variables work from Page1 to Page2 / lost from Page2 to Page3


Hello all

I have a small webform application with three WebForms that use session
variables to maintain session data (user name)

When I transfer to page 2 from page1 session state is transferred OK, but is
lost when I use a command button to transfer from page2 to page3.

It seem to have something to do with a timeout of some sort because if I
transfer from page2 loadEvent directly to page3,
the session variable is maintained.

I have disabled my anti virus software completely.

I have checked in my cookies folder and the cookie is just not being created
(IE is set to prompt before accepting cookies)

I am using VS.NET 2003 and ASP.NET 1.1

Any suggestions / tip would be greatly appreciated

my web config is as follows

<sessionState

mode="InProc"

stateConnection String="tcpip=1 27.0.0.1:42424"

sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"

cookieless="fal se"

timeout="20"

/>
Nov 19 '05 #1
2 1406
Forgot to mention : my dev machine runs XP-PRO

"P. Prosper" <none@none> wrote in message
news:eI******** *****@TK2MSFTNG P12.phx.gbl...

Hello all

I have a small webform application with three WebForms that use session
variables to maintain session data (user name)

When I transfer to page 2 from page1 session state is transferred OK, but is lost when I use a command button to transfer from page2 to page3.

It seem to have something to do with a timeout of some sort because if I
transfer from page2 loadEvent directly to page3,
the session variable is maintained.

I have disabled my anti virus software completely.

I have checked in my cookies folder and the cookie is just not being created (IE is set to prompt before accepting cookies)

I am using VS.NET 2003 and ASP.NET 1.1

Any suggestions / tip would be greatly appreciated

my web config is as follows

<sessionState

mode="InProc"

stateConnection String="tcpip=1 27.0.0.1:42424"

sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"

cookieless="fal se"

timeout="20"

/>

Nov 19 '05 #2
I've just solved a very similar problem to this one - have you checked what
URL you are using to access the front page of the site? Is it possible that
when you get as far as page 3, the application starts using a different URL.

My problem was that the user was using an IP address stored in his
Favourties list to connect to page 1 (eg http://123.4.5.6/login). He logged
in, and was redirected to page 2 via a relative URL (http://123.4.5.6/home).
The user clicks on a hyperlink to go to page 3, and they are redirected to an
absolute URL that uses a domain alias (eg http://www.myapp.com/search) - but
IE thinks its being redirected to an entirely different website, so it drops
the Session ID it should have sent to the server to identify itself. The user
then gets sent back to page 1, this time with the domain alias
(http://www.myapp.com/login) - and so this time, the login works as expected.

See if that works for you.

Paul
"P. Prosper" wrote:

Hello all

I have a small webform application with three WebForms that use session
variables to maintain session data (user name)

When I transfer to page 2 from page1 session state is transferred OK, but is
lost when I use a command button to transfer from page2 to page3.

It seem to have something to do with a timeout of some sort because if I
transfer from page2 loadEvent directly to page3,
the session variable is maintained.

I have disabled my anti virus software completely.

I have checked in my cookies folder and the cookie is just not being created
(IE is set to prompt before accepting cookies)

I am using VS.NET 2003 and ASP.NET 1.1

Any suggestions / tip would be greatly appreciated

my web config is as follows

<sessionState

mode="InProc"

stateConnection String="tcpip=1 27.0.0.1:42424"

sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"

cookieless="fal se"

timeout="20"

/>


Nov 19 '05 #3

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

Similar topics

3
6276
by: Ralph Freshour | last post by:
I was reading about PHP variable scoping - it doesn't seem to support carrying any variables from one web page to another - how is this usually done? I have a lot of php variables created on my home page that I need to make use of on other web pages - how can I do that? Thanks...
3
661
by: Nick Young | last post by:
Hi All, I am trying to get to grips with PHP Sessions. I have a very simple logon script that works fine so long as the client allows cookies. However when they have cookes turned off (and I know some of them will do) it dosnt work. I have 2 simple scripts below for testing that dont work. I have tried various settings such as: ini_set('session.use_trans_sid', false); AND ini_set('session.use_trans_sid', true);
4
1641
by: bateman | last post by:
Hi, I have a rather puzzling problem, have asked the ASP experts at work with no joy and its driving me mad! I'll explain the steps in more detail below but the general problem is I am manually creating a datetime value in my asp pages that I am putting in a session. Now this isn't being passed from page to page while other session objects are. There is no reason I can see for this happening. The steps I am using are: page1.asp - A...
2
1059
by: acko bogicevic | last post by:
Hi I have a session variable "sUser" On Page_Load on Page1 i give a value for sUser like this Session("sUser")="User1" When i go to Page2 from Page1 this code works fine: Response.Write(Session("sUser") But when i go to Page3 from Page2 code above does not work fine.
4
2165
by: nicholas | last post by:
I'm using context to transfer variables from 1 page to another. But, with more than 2 pages it fails. Ex: page1.aspx: Context.Items.Add("customername", customername.text) Server.Transfer("page2.aspx") page2.aspx: response.write(Context.Items("customername")) => returns the customername
0
1484
by: Aarchaic | last post by:
Hello i have problem my session variables seem to disapear as i go along i've created this code to ilustrate whats happening First off i just post 3 detials like a name a age and a favourite number. that in turn goes to the next page where its being picked up by the php code and put into the Global Variable. the page uses the variables with no problem and you can select a link to go onto the next page where the number is being...
5
2663
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, Recently, I just found out that our program behaves differently from before. in our asp, in order to prevent data disppearing problem in form fields,we use session variable to display the field values if a customer click "back" button on the page2.asp in the browser,(the session variables Session(aQuoteName(iPerson)&"TripCost") is set up in the page2.asp) i.e. then in the page1.asp, we use: <input name="<%=aQuoteName(iPerson)&...
1
1238
by: Chris | last post by:
Hi, I have a problem with sitemap combined with role. I posted in the professional group but i reformulated here and made the things simplier: I tried a lot of things, read a lot of stuff, but it's still unsolved. there are two defined users: user1 and user2 there is one role: manager user1 belongs to the role manager; user2 not.
4
10707
by: John H | last post by:
Hi, I'm busy fiddling with sessions under PHP5, and very quickly learned what I would have found out even sooner in the PHP manual - declaring your session variable on page1.php makes it available on page2.php (assuming that's the next page you load) but doesn't then make it available on page3.php unless you respecify it on page2.php. I'm sure there's a very good reason for it, and I know I can get around it by using a database and the...
0
9780
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
10769
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
10520
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,...
1
7739
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6940
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
5615
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
5775
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4408
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
3
3070
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.