473,569 Members | 2,793 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Losing Session vars on Redirect - HELP

All the sudden my app has started to loose Session values after a
Response.Redire ct to another page in the same project. Ive read several post
about setting the Terminate Boolean to false to solve this problem, but it
hasnt work. On top of that it seems total random.

I have a start.aspx page that all other web application call to begin the
process. This start page creates needed Sessions and other miscellaneous
tasks, and then redirects to another page that uses the session data.

This only seems to be affecting me when Im using a model window to redirect.
Now I know model windows open a new window when something in them causes a
post back (and we figure a way to solve that problem long ago), but this is
happening before the page is rendered.

Placing breakpoints in the code shows that Response.Redire ct is firing off
Session_Start in the global asax. Overriding the browsers cookie handing to
allow session cookies works, but it also configured as cookieless=fals e in
the web.config for the sessionState, so even if I didn’t override the browser
cookie handling, why is it working sporadically (very sporadically actually)

Any ideas. Im using C# and VS2005?
--
JP
..NET Software Developer
Sep 19 '07 #1
4 2041
Each browser instance starts its own Session.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"JP" <JP@discussions .microsoft.comw rote in message
news:2A******** *************** ***********@mic rosoft.com...
All the sudden my app has started to loose Session values after a
Response.Redire ct to another page in the same project. Ive read several
post
about setting the Terminate Boolean to false to solve this problem, but it
hasnt work. On top of that it seems total random.

I have a start.aspx page that all other web application call to begin the
process. This start page creates needed Sessions and other miscellaneous
tasks, and then redirects to another page that uses the session data.

This only seems to be affecting me when Im using a model window to
redirect.
Now I know model windows open a new window when something in them causes a
post back (and we figure a way to solve that problem long ago), but this
is
happening before the page is rendered.

Placing breakpoints in the code shows that Response.Redire ct is firing off
Session_Start in the global asax. Overriding the browsers cookie handing
to
allow session cookies works, but it also configured as cookieless=fals e in
the web.config for the sessionState, so even if I didn't override the
browser
cookie handling, why is it working sporadically (very sporadically
actually)

Any ideas. Im using C# and VS2005?
--
JP
.NET Software Developer

Sep 20 '07 #2
I realize that. But this is starting a new session in the same window. It
should start a new session with the window.open, but not on a redirect to
another page within the project. And whats worse is, its random. Mostly
starts a new session, but about 20% its just fine.

--
JP
..NET Software Developer
"Kevin Spencer" wrote:
Each browser instance starts its own Session.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"JP" <JP@discussions .microsoft.comw rote in message
news:2A******** *************** ***********@mic rosoft.com...
All the sudden my app has started to loose Session values after a
Response.Redire ct to another page in the same project. Ive read several
post
about setting the Terminate Boolean to false to solve this problem, but it
hasnt work. On top of that it seems total random.

I have a start.aspx page that all other web application call to begin the
process. This start page creates needed Sessions and other miscellaneous
tasks, and then redirects to another page that uses the session data.

This only seems to be affecting me when Im using a model window to
redirect.
Now I know model windows open a new window when something in them causes a
post back (and we figure a way to solve that problem long ago), but this
is
happening before the page is rendered.

Placing breakpoints in the code shows that Response.Redire ct is firing off
Session_Start in the global asax. Overriding the browsers cookie handing
to
allow session cookies works, but it also configured as cookieless=fals e in
the web.config for the sessionState, so even if I didn't override the
browser
cookie handling, why is it working sporadically (very sporadically
actually)

Any ideas. Im using C# and VS2005?
--
JP
.NET Software Developer


Sep 20 '07 #3
Have you checked the event log to make sure something in the redirect isn't
causing the site to crash and therefore restart the ASP.NET worker process /
site?
"JP" <JP@discussions .microsoft.comw rote in message
news:94******** *************** ***********@mic rosoft.com...
>I realize that. But this is starting a new session in the same window. It
should start a new session with the window.open, but not on a redirect to
another page within the project. And whats worse is, its random. Mostly
starts a new session, but about 20% its just fine.

--
JP
.NET Software Developer
"Kevin Spencer" wrote:
>Each browser instance starts its own Session.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"JP" <JP@discussions .microsoft.comw rote in message
news:2A******* *************** ************@mi crosoft.com...
All the sudden my app has started to loose Session values after a
Response.Redire ct to another page in the same project. Ive read several
post
about setting the Terminate Boolean to false to solve this problem, but
it
hasnt work. On top of that it seems total random.

I have a start.aspx page that all other web application call to begin
the
process. This start page creates needed Sessions and other
miscellaneous
tasks, and then redirects to another page that uses the session data.

This only seems to be affecting me when Im using a model window to
redirect.
Now I know model windows open a new window when something in them
causes a
post back (and we figure a way to solve that problem long ago), but
this
is
happening before the page is rendered.

Placing breakpoints in the code shows that Response.Redire ct is firing
off
Session_Start in the global asax. Overriding the browsers cookie
handing
to
allow session cookies works, but it also configured as cookieless=fals e
in
the web.config for the sessionState, so even if I didn't override the
browser
cookie handling, why is it working sporadically (very sporadically
actually)

Any ideas. Im using C# and VS2005?
--
JP
.NET Software Developer



Sep 20 '07 #4
Is the Modal browser window calling Response.Redire ct?

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"JP" <JP@discussions .microsoft.comw rote in message
news:94******** *************** ***********@mic rosoft.com...
>I realize that. But this is starting a new session in the same window. It
should start a new session with the window.open, but not on a redirect to
another page within the project. And whats worse is, its random. Mostly
starts a new session, but about 20% its just fine.

--
JP
.NET Software Developer
"Kevin Spencer" wrote:
>Each browser instance starts its own Session.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"JP" <JP@discussions .microsoft.comw rote in message
news:2A******* *************** ************@mi crosoft.com...
All the sudden my app has started to loose Session values after a
Response.Redire ct to another page in the same project. Ive read several
post
about setting the Terminate Boolean to false to solve this problem, but
it
hasnt work. On top of that it seems total random.

I have a start.aspx page that all other web application call to begin
the
process. This start page creates needed Sessions and other
miscellaneous
tasks, and then redirects to another page that uses the session data.

This only seems to be affecting me when Im using a model window to
redirect.
Now I know model windows open a new window when something in them
causes a
post back (and we figure a way to solve that problem long ago), but
this
is
happening before the page is rendered.

Placing breakpoints in the code shows that Response.Redire ct is firing
off
Session_Start in the global asax. Overriding the browsers cookie
handing
to
allow session cookies works, but it also configured as cookieless=fals e
in
the web.config for the sessionState, so even if I didn't override the
browser
cookie handling, why is it working sporadically (very sporadically
actually)

Any ideas. Im using C# and VS2005?
--
JP
.NET Software Developer



Sep 21 '07 #5

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

Similar topics

0
1422
by: james | last post by:
I am new to php and need some help getting the session variables into include files. (after-thought, Sorry for the drawn out post but I really, really need help....;) Here's what I'm doing.. I have a php request_form that I use 2 different ways: by itself (url directly to the form) and as an include to be displayed in existing php pages....
2
2343
by: GFuller | last post by:
- We have 2 aspx pages in a .NET project. The first sets a session variable and has a button that when clicked performs a 'redirect' to the second page which then reads the session variable. Problem: This always works fine on the localserver and through the IDE. But when the application is put onto a www website, the following occurs;...
1
1353
by: samtran331 | last post by:
Hi all I've got a .Net site that has 3 session variables...the variables should persist over 23 unique insert pages, 23 update, and 23 "view total" pages... And the problem is once I get past one page, the session vars disappear The logic is 1. logon = set a session var to the email addres 2. redirect to a "main page" that uses the email...
1
3157
by: John | last post by:
Hi, I have a routine that sets some session variables and then redirects the user to another page in the same application/ same folder. ======= Session("MyName") = "Fredsmith" Response.Redirect("./AnewPage.aspx") ======= If I go, Response.Write(Session("MyName")) in the new page the session variable does not exist.
2
2089
by: scott_shuster | last post by:
Hi, I need to preserve state as I'm Response.Redirecting to a page in a subfolder elsewhere in my web. However, everytime I redirect, my session vars are cleared out. Are Session variables not persistent to redirects on pages in different folders? Scott
0
1383
by: Jimmy Reds | last post by:
Hi, Sorry if this appears twice but I post through Google Groups and it had a funny 5 minutes and didn't appear to post this message the first time. I am setting session variables on a page then doing a header/location redirect to a second page however I am losing one of my session variables. Not all of them, just one.
2
1548
by: Jimmy Reds | last post by:
Hi, I am setting session variables on a page then doing a header/location redirect to a second page however I am losing one of my session variables. Not all of them, just one. Here are some details/comments: I am doing a session_start() on ALL of my pages, right at the top of each page
2
399
by: Ned Balzer | last post by:
Hi, Apologies if this is a newbie question, I haven't found the answer in any faqs. I have an asp.net 2.0 page that sets session variables and then redirects to another page. For the page that gets redirected to, I've swapped in a simple page for testing that reads the session variables and displays their values.
5
6121
by: chromis | last post by:
Hi there, I've recently been updating a site to use locking on application level variables, and I am trying to use a commonly used method which copies the application struct into the request scope. Application variables are then accessed in this manner Request.App.<Var>. To begin with I had a simple functioning login system inside a...
0
7695
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
7612
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...
0
7922
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. ...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
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
7964
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
6281
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...
0
5218
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...
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.