session lost with response.redirect

hi.I have an 2003 web project with is simple.when user logs in through login.aspx, his login information is being kept in session variables. then with response.redirect he goes to main page. here there is a session control in page load if his session expired. but session gets lost immediately after he logins and goes to the main page. what could be causing this? thanks.
11/7/2006 3:49:19 PM 8807 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 48
Get it on Google Play
Get it on Apple App Store

hi thanks for your answer,

I tried the solutions in it but didnt work. actually with FormsAuthentication.RedirectFromLoginPage method, page goes to default.aspx after login process and I couldnt change it. is there a way to change it or any other solutions? thanks.

11/8/2006 1:26:06 PM

write this


Anas Ghanem.

Note:Please Don't hesitate to click "Report Abuse" link if you noticed something wrong on the forums (like duplicate ,Off-topic,offensive,or any post that violates the website "TERMS OF USE"). -- Thanks!

11/9/2006 12:13:30 PM

Similar Artilces:

Session Variables lost after Response.Redirect()
Hi gurus,  I encouter lost session variables trouble when Response.Redirect() to another aspx page. I set 19 Session variables before redirecting. However, the redirected page's session contains only One variable. The very weir sympton is: If I restart IIS, only for the first IE encounter, the redirected page DOES show all 19 session variables.Once I close IE, any further IE or IE from any other machine's only shows ONE session variable. I can also reproduce such symptons in VS2005 development environment. Can someone tell me what I have missed?   Thanks! Here is ...

Session state lost when url is an redirect
Hi, I have a website ( and created a implementation of user validation (just a validate with database and save it into the session). The user data will be saved in Session, to make this information available through the application. This works fine. However, there exists also a website (, but this only a redirect to "mysite1". This redirect will keep the url of "mysite2" in the address bar. Now the part i don't get: When login through "mysite2" the userdata isn't persisted. Could anyone tell me why the second website give these problems? tx, RamR0m d...

Session state lost every other session after conversion from 2003 to 2005
Hi, I have a weird problem here I can't really place. Maintaining session state was never a problem with VS2003 but after the conversion to VS2005 I have session state problems.I put a value in the session state in the !IsPostBack in Page_Load. After that if statement I take out that variable again just to test if it is in the session state. This goes ok for the first time I work with th e application. If I then close the browser and go to it again this fails. After the postback the webapplication doesn't enter the !IsPostBack if statement but the variable is also not in the Ses...

about session state management
i am new in this field and i want to know , how can i manage login state management in web application . what namespace and attribute and property should i use. please reffer me   Check these links.. Blog"Don't be afraid to be wrong; otherwise you'll never be right." check out previous discussion  Haissam Abdul MalakMCAD.NET| Bl...

Managing Session State
 Hi, Is there a way to set how long a session variable persists before it is destroyed?  I use forms based authentication on my site, but some events are based on particular session variables, and often times the session variable will be destroyed if the user leaves the session idle for a few minutes.  Can I configure my site so that session variables stick around until the forms authentication session is over?  Or, is it possible to set an event that triggers when the session state expires or when the session variables are destroyed that redirects to the login page?...

Session state has created a session id, but cannot save it because the response was already flushed by the application.
this messaage appears when i try to debug my application in ctrl-F5 mode or lauch from within IIS it doesn't happening. the solution migrated from beta to RTM version (never been developed on 2003 before) i be greatful if anybody will point to solution of this problem  Thanks Actually it does appear in any case but the error which popping out from  within the  global.asax in app_error but since all the pages load properly and application enters to this function right afterwards so the bug is trasparent to user but anoying to developer (me )...

Session state managment
Can anyone refer me to a session state managment book and security practices if there is anything like that out their. Pelease check these sites. You may find them helpful. Mark As Answer if it helps you!...

Session State Lost
i have  a web application in which the user start by a login form(.aspx)  and then after login a another page(.aspx) opens with a header user control which checks if Session("UserID") is set and if it is not then it redirects him into the login page. Note: this Session("UserID") is set during the login. My problem is that for some reason after login Session("UserID") is lost  and the user is redirected to the login page knowing that he loggend in with a valid account. Note i have pages with iframes and framesets and this occur mainly after navigat...

Lost Session State
Hi all I'm just starting to look at using session state and have run into difficulties. I have a simple application consisting of 2 pages, one with a text box and a button, the other is blank.  When some text is entered into the text box and the button is clicked, the text is displayed in the second page.  However it doesn't work.  If I change the code to display the text in the first page it works fine. I am right in thinking that session state is maintained between pages aren't I? Regards James Upon further research I'm starting to think it is somethin...

Session State Management
Which is the better option? Storing Session In Process .. Same process as the Web Server Storing Session State in a Windows Service .... ASP.NET State Storing Session State in Database. I am debating the pro's and con's of the three, basically it is for providing the typical who is online and what portion of the site they are visiting at the moment. I am tempted to use the Windows Service and run in on a secondary box.    AngeloA Hi,I moved your post from the FAQ forum to here as the FAQ forum is for posting answers to commonly asked questions, not asking questions.Ryan...

Session state has created a session id, but cannot save it because the response was already flushed by the application.
Session state has created a session id, but cannot save it because the response was already flushed by the application. In our project, we are facing this problem. WE didnt use any Response.Flush() anywhere in our project.What is the reason for this error? How to resolve this?   where does this happen? If on redirect, you should use redirect(url,false)   hi, check this thread,   In pageload event of the page this bug occured. Not in Response.REdirect... What is the solution?    In pageload event of the page...

I wrote code Response.Redirect then page is not redirected to reqquested page (
I wrote code Response.Redirect then page is not redirected to reqquested page  (with make sure that your target URL is valied and correct... or the problem might be from your browserRegards...Nassar, RamiMy Blog || E-Mail Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. dear, just paste the code so that we can assist u accordinglyKind Regards,Saurabh Sharmaonly dead fish swim along the flow of river, learn to make yo...

Lost session state
Hello,     We have a web application that occasionally is losing session for users.  We have put code in to recover via a cookie when this happens, but are trying to track down the root cause.  I know application isn't resetting because we have put code in on application start to set an application variable to the current datetime.  When we hit the code where the user's session is empty, we are logging it and the application variable is still present with the older date.  We are also setting a datetime value on session start and when we hit the recovery co...

Error :Session state has created a session id, but cannot save it because the response was already flushed by the application.
Hello, we have a website that was developed under ASP.NET 1.1 and now we want to run it under ASP.NET 2.0. Since we cannot access the original code we placed it in a separate Application Pool and tested the site. Apparently all is oke, however every now and then the following problem: Exception message: Session state has created a session id, but cannot save it because the response was already flushed by the application. I researched the internet and found some possible solutions. One of them is not using Response.Flush(), but since we cannot access the source that isn't option.&...

Web resources about - session lost with response.redirect -

Wikipedia:Abuse response - Wikipedia, the free encyclopedia
For a list of current Abuse Response volunteers, or for information on how you can help with the Abuse Response project, please see the volunteers ...

George Pell’s Melbourne Response child sexual abuse program
THE victims of child sexual abuse within the Catholic Church just want to be heard.

'God isn't fixing this': US politicians condemned for response to latest mass shooting
In the aftermath of a serious tragedy, it's good advice not to reach for cliche. Particularly when those words aren't followed by action.

'Ugliest girls' poll: Student's response to cyberbullying goes viral
A Torbay, N.L., high school student's response to online bullying is winning praise from friends and family.

Santa lookalike has perfect response to little boy in restaurant
Customers "teary-eyed" over elderly man's reaction to young boy in doughnut shop

The Murders At Planned Parenthood And The Unbelievable GOP Response
Yesterday on Morning Joe , Joseph McQuaid, the publisher of the New Hampshire Union Leader, was asked why his newspaper was endorsing Chris Christie ...

Play Darth Vader with Siri and get some hilarious responses
The whole tech world is losing its mind with Star Wars mania, and Apple’s no exception. Hidden within Siri is a neat reference to George Lucas’ ...

Democratic Senator: Prayers Are ‘Wholly Insufficient’ Responses To Shootings
Democratic Senator: Prayers Are ‘Wholly Insufficient’ Responses To Shootings

Disaster-Response Robots Demonstrate Their Skills
This year's International Robot Exhibition in Tokyo is focused on robotic equipment for disaster relief.

Adriana Lima Shuts Down Justin Bieber Hookup Rumors With Epic Response
Adriana Lima Shuts Down Justin Bieber Hookup Rumors With Epic Response

Resources last updated: 12/7/2015 8:10:33 AM