Click here to Skip to main content
15,919,341 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: how to get the dynamically created radiobutton checked values Pin
Ibrahim Hebish11-Jan-12 0:59
Ibrahim Hebish11-Jan-12 0:59 
Questionhow to pass selected value to subreport(crystal report) Pin
Ramkumar_S14-Dec-11 0:18
Ramkumar_S14-Dec-11 0:18 
Questionsearching in populated GridView using Select statements Pin
Taysseer Kadri13-Dec-11 22:15
Taysseer Kadri13-Dec-11 22:15 
QuestionEntity Framework Pin
indian14313-Dec-11 15:50
indian14313-Dec-11 15:50 
Questioncreate textbox dynamically Pin
en.Mahdi13-Dec-11 2:11
en.Mahdi13-Dec-11 2:11 
AnswerRe: create textbox dynamically Pin
R. Giskard Reventlov13-Dec-11 3:16
R. Giskard Reventlov13-Dec-11 3:16 
GeneralRe: create textbox dynamically Pin
Dennis E White13-Dec-11 6:32
professionalDennis E White13-Dec-11 6:32 
QuestionSession Timeout Pin
Priya Prk12-Dec-11 5:37
Priya Prk12-Dec-11 5:37 
Dear all,

I have the following configuration for my sessionState:

<sessionState mode="InProc" cookieless="UseCookies" timeout="10" >>


It works fine, but there is one thing i don't understand.
When i open multiple tabs, all tabs have the same SessionID, but they don't time out at same time.
I thought that all tabs share the same session, so they have to have also the same timeout Sleepy | :zzz:
What i want is that ofter session timeout occurs, to logout the user from all opened tabs at the same time.
But in my situaion, when two tabs are open, the first one logs the user out, but not from the second tab. On the second tab, the user still can work.
This is my code to logout and redirect the user ofter session timeout:

C#
protected void Session_Start(object sender, EventArgs e)
        {
            if (Context.Session != null)
            {
                if (Context.Session.IsNewSession)
                {
                    string sCookieHeader = Request.Headers["Cookie"];
                                       

                    if ((null != sCookieHeader) && (sCookieHeader.IndexOf("ASP.NET_SessionId") >= 0))
                    {
                        //signout the user and redirect to the login page
                        FormsAuthentication.SignOut();
                        HttpContextBase httpContext = new HttpContextWrapper(HttpContext.Current);
                        UrlHelper urlHelper = new UrlHelper(new RequestContext(httpContext, new RouteData()));
                        string redirectUrl = urlHelper.Action("LogOn", "Account");
                        httpContext.Response.Redirect(redirectUrl);
                    }
                }
            }
        }


How can i solve this issue?

Thanks in advance.
AnswerRe: Session Timeout Pin
Dalek Dave13-Dec-11 12:49
professionalDalek Dave13-Dec-11 12:49 
QuestionHow to upload image and immediate open in ImageControl without database in asp.net C# ? Pin
Dharmesh11111-Dec-11 19:04
Dharmesh11111-Dec-11 19:04 
AnswerRe: How to upload image and immediate open in ImageControl without database in asp.net C# ? Pin
thatraja11-Dec-11 19:59
professionalthatraja11-Dec-11 19:59 
Questionset gridview cell text null Pin
uspatel11-Dec-11 19:03
professionaluspatel11-Dec-11 19:03 
AnswerRe: set gridview cell text null Pin
Karthik Harve11-Dec-11 21:39
professionalKarthik Harve11-Dec-11 21:39 
GeneralRe: set gridview cell text null Pin
uspatel11-Dec-11 23:19
professionaluspatel11-Dec-11 23:19 
AnswerRe: set gridview cell text null Pin
Jitendra Parida - Jeetu11-Dec-11 23:45
Jitendra Parida - Jeetu11-Dec-11 23:45 
GeneralRe: set gridview cell text null Pin
uspatel12-Dec-11 0:52
professionaluspatel12-Dec-11 0:52 
QuestionCache Problem Pin
Shyamjith Cherukara11-Dec-11 18:07
Shyamjith Cherukara11-Dec-11 18:07 
QuestionUsing wiki templates Pin
_AnsHUMAN_ 11-Dec-11 17:17
_AnsHUMAN_ 11-Dec-11 17:17 
QuestionMVC Areas - Home Controller naming conflict Pin
DaveAuld11-Dec-11 14:03
professionalDaveAuld11-Dec-11 14:03 
GeneralRe: MVC Areas - Home Controller naming conflict Pin
Richard MacCutchan11-Dec-11 22:26
mveRichard MacCutchan11-Dec-11 22:26 
QuestionSchema importer extension and target type ReadXml method ???? Pin
devboycpp11-Dec-11 7:48
devboycpp11-Dec-11 7:48 
QuestionBulk file uplaod from a folder Pin
yesu prakash10-Dec-11 0:45
yesu prakash10-Dec-11 0:45 
AnswerRe: Bulk file uplaod from a folder Pin
raju melveetilpurayil10-Dec-11 15:57
professionalraju melveetilpurayil10-Dec-11 15:57 
QuestionHOW TO AVOID MASTER PAGE REFRESH -WHEN MENU ITEM IS CLICKED-NEED HELP Pin
Member 32222648-Dec-11 17:57
Member 32222648-Dec-11 17:57 
AnswerRe: HOW TO AVOID MASTER PAGE REFRESH -WHEN MENU ITEM IS CLICKED-NEED HELP Pin
uspatel10-Dec-11 1:52
professionaluspatel10-Dec-11 1:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.