Re: Problems with Session.IsNewSession - Please help...
- From: "Peter Bradley" <pbradley@xxxxxxxxxx>
- Date: Thu, 14 Dec 2006 14:37:06 -0000
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
.
- Follow-Ups:
- Re: Problems with Session.IsNewSession - Please help...
- From: Peter Bromberg [C# MVP]
- Re: Problems with Session.IsNewSession - Please help...
- References:
- Problems with Session.IsNewSession - Please help...
- From: rsouza
- Problems with Session.IsNewSession - Please help...
- Prev by Date: Re: timer...
- Next by Date: How to pass and input control into a function
- Previous by thread: Problems with Session.IsNewSession - Please help...
- Next by thread: Re: Problems with Session.IsNewSession - Please help...
- Index(es):
Relevant Pages
|