Re: Problems with Session.IsNewSession - Please help...

Tech-Archive recommends: Speed Up your PC by fixing your registry



I've replied to you in another newsgroup.

Cross posting like this, when the groups concerned are in the same "family"
(e.g. microsoft.public.dotnet ...) may be counter-productive for you. I
understand why people do it, but my experience suggests that it is best to
post to the group that seems most relevant and then only post to another
group if help is not forthcoming.

But it could be just me who's getting old and grumpy.


Peter

"rsouza" <rodrigoszn@xxxxxxxxx> wrote in message
news:1166101523.403979.125160@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi.

Recently here in my work we added the following code in the Global.asax
file to handled the session expired and redirect users to the home of
the site explaining them the occurred (some thing like "Your session
has expired, please restart your navigation.").

public void Session_Start(Object sender, EventArgs e) {

if(Session.IsNewSession && Request.Headers["Cookie"] != null &&
Request.Headers["Cookie"].IndexOf("ASP.NET_SessionId") >= 0)
{
Response.Redirect("/index.aspx?timeout=1");
// when the param "timeout" exists in the url the user
receives the message "... Session expired ..."
}
}

In our tests the code above works fine, but now sometimes we open the
browser, type the url address of the site and the message "... session
expired ..." appears. This occurs just in some machines and not all the
times we access the site.

Someone knows what is happening??

Thanks

Rodrigo



.



Relevant Pages

  • Re: Best Place To Request Office 2000 Help
    ... I have to get the names of the other groups I'm cross posting ... Please Reply to Newsgroup for the benefit of others ... Requests for assistance by email can not and will not be acknowledged. ...
    (microsoft.public.officeupdate)
  • Re: Best Place To Request Office 2000 Help
    ... I have to get the names of the other groups I'm cross posting ... Please Reply to Newsgroup for the benefit of others ... Requests for assistance by email can not and will not be acknowledged. ...
    (microsoft.public.officeupdate)
  • Re: Best Place To Request Office 2000 Help
    ... I have to get the names of the other groups I'm cross posting ... Please Reply to Newsgroup for the benefit of others ... Requests for assistance by email can not and will not be acknowledged. ...
    (microsoft.public.officeupdate)
  • Re: LET IT BE KNOWN TO ALL THE WORLD!!!,...., "GOD HATES FAGS!!!..." (Re: My take on the Same-Se
    ... Please stop cross posting. ... their trash on this newsgroup. ... Actually I snipped all the other addresses in my response to your ... Why don't you post some funny stories from the corp years...or ...
    (rec.arts.marching.drumcorps)
  • Re: Wamp help! mySQL wont start
    ... J.O. Aho a écrit: ... Cross posting? ... you have only selected one newsgroup here, so if you sent the same message to more than one newsgroup, then you have been multi posting which is a no no. ... IMHO things are a lot easier if using an Unix or Unix-like operating system, these usually has the option to install all the stuff during initial install and which then will work fine without further hassle. ...
    (alt.php)