2
Vote

Session Timeout

description

When we set sessionState, timeout partial postback does not abandon the session. Here's the details when of the session from immd window..
 
After first refresh....
 
?context.Session
{System.Web.SessionState.HttpSessionState}
CodePage: 65001
Contents: {System.Web.SessionState.HttpSessionState}
CookieMode: UseCookies
Count: 0
IsCookieless: false
IsNewSession: true
IsReadOnly: false
IsSynchronized: false
Keys: {System.Collections.Specialized.NameObjectCollectionBase.KeysCollection}
LCID: 1033
Mode: InProc
SessionID: "pv4hfv55c1ca5w55n3onzd45"
StaticObjects: {System.Web.HttpStaticObjectsCollection}
SyncRoot: {System.Web.SessionState.HttpSessionStateContainer}
Timeout: 20
?context.User
{System.Security.Principal.WindowsPrincipal}
[System.Security.Principal.WindowsPrincipal]: {System.Security.Principal.WindowsPrincipal}
Identity: {System.Security.Principal.WindowsIdentity}
?context.User.Identity
{System.Security.Principal.WindowsIdentity}
[System.Security.Principal.WindowsIdentity]: {System.Security.Principal.WindowsIdentity}
AuthenticationType: "NTLM"
IsAuthenticated: true
Name: "MyDomain\\usersName"
 
 
 
After Timeout limit (20 min)
everything was identical as above except for AuthenticationType: "negotiate"
 
{System.Security.Principal.WindowsIdentity}
[System.Security.Principal.WindowsIdentity]: {System.Security.Principal.WindowsIdentity}
AuthenticationType: "negotiate"
IsAuthenticated: true
Name: "MyDomain\\usersName"
 
 
Any ideas??

comments

OvErYo wrote Dec 15, 2008 at 3:55 PM

We fix this bug : (Edit PartialUpdatePanel.js)
_loadingComplete: function(sender, eventArgs) {
    var request = sender.get_webRequest();
    var _this = request.get_userContext();
    var element = _this.get_element();

    _this._clearShowLoadingPanelTimer();

    if (sender.get_responseAvailable()) {
        // loading succeeded            
        var loadingPanel = $get(element.id + '_LoadingPanel');
        var contentPanel = $get(element.id + '_ContentPanel');

        // show content
        if (contentPanel) {
            // dispose components bound to old content
            var pageRequestManager = Sys.WebForms.PageRequestManager.getInstance();
            pageRequestManager._destroyTree(contentPanel);

            //    *******  Bug fixed on session expired  *******
            var response = sender.get_responseData();
            var responses = response.split('|');
            if (responses != null) {
                if ((responses.length == 5) && (responses[1] == "pageRedirect")) {
                    if (responses[3].indexOf('.ashx') > 1) {
                        var redirectUrl = responses[3].substring(0, responses[3].indexOf('?'));
                        document.location.href = redirectUrl;
                    }
                    else {
                        document.location.href = responses[3];
                    }
                    return;
                }
            }
            // ******** Bug fixed End *******
            contentPanel.innerHTML = response;
            contentPanel.style.visibility = 'visible';

        }
   ... 
Stefan, could you check that and add it ?

Yohann -> a PartialUpdatePanel fanboy !

wrote Dec 15, 2008 at 3:55 PM

wrote Feb 13, 2013 at 9:49 PM