I configured session state in web.config.
<sessionState cookieless="AutoDetect" timeout="5" sqlConnectionString="....."/>
Now, I want to know timeout and sqlConnectionString from code-behind. Please, help me.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Session.Timeout to know timeout value.
However, better way is to use configuration API to read configuration. In this case, use code given below to get reference to session state configuration and then use properties such as SqlConnectionString and Timeout to find the necessary configured values.