views:

94

answers:

3

I have an asp.net website, where there is no where session is implemented.

But i could see the session is timing out when i take the website after deploying in the production server ...

i checked the session entries in the web.config file... and searched session in the code..

nowhere i find the entry...

now i want to put a message box while session timeout ..how to do this..please help!!

+1  A: 

you could check this in your web.config and increase time...

<sessionState timeout="20"></sessionState>

also check your sessionStatemode...

<sessionState mode="InProc"></sessionState>
Muhammad Akhtar
there is no entries like above in my web.config
read this article and add as per your requirement. http://msdn.microsoft.com/en-us/library/ms972429.aspx
Muhammad Akhtar
A: 

You asked the same question two hours ago Popup while session timeout

Vedran
+1  A: 

Put this in your aspx html code

<script language="javascript" type="text/javascript">
    setTimeout('SessionTimeout()', <%= Session.Timeout * 60 * 1000 %>);
    function SessionTimeout() {
        alert(<%= "'Session time out!!'" %>);
        window.location = "Default.aspx"
    }
</script>
Petoj
Thankkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkssssssssssssss
any time glad to help
Petoj
Petoj..how to set this code for 19 second ?
you can define the session timeout in web.config.
Petoj