0

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!!

4
  • I'm sorry, but I don't get your question at the moment: Why do you need to see the session timout and how do you see it in the moment? Are we speaking from a live envoirement with ISS in background or from IDE's like Visual Studio? Commented Dec 3, 2009 at 11:24
  • Maybe you could post the code where the session is timing out, and your session entries from web.config? Otherwise it's pretty hard to help. Commented Dec 3, 2009 at 11:27
  • You asked the same question two hours ago Popup while session timeout Commented Dec 3, 2009 at 11:52
  • i couldn't post the code since i didn't find any entries ...for session in the code or web.config ... when i deployed the code in my iis server. when i take the link after deploying and keep untouched for one hour...session will timeout. Commented Dec 3, 2009 at 11:52

2 Answers 2

2

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

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

also check your sessionStatemode...

<sessionState mode="InProc"></sessionState>
Sign up to request clarification or add additional context in comments.

2 Comments

there is no entries like above in my web.config
read this article and add as per your requirement. msdn.microsoft.com/en-us/library/ms972429.aspx
1

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>

6 Comments

Thankkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkssssssssssssss
you can define the session timeout in web.config.
'Session.Timeout * 60 * 19000' for 19 sec :-)
@Eagle_one don't do that, change the timeout in web.config otherwise the SessionTimeout function will be called at a different time than the accentual session timeout...
Peter..Thanks I know I answered the second question only ;-)
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.