1

I can use the Session fine, but I don't know how to control the timeout. Can someone help me? I would like to set the timeout in my web.config. Here is my code:

Session["u"] = "ha";

How can I extend the timeout?

1

2 Answers 2

2

Adjust the timeout in sessionState section; value is minutes until timeout

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

Comments

1

have you tried Session.Timeout?

this will set the timeout programmatically for all session variable though

Regards, Shailesh

Comments

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.