Session timeout problem
-
Dear all... I'm handling a login form, where let the user to login in pageA before entering pageB or pageC. When running at localhost, everything was fine. Now the problem is when i put into the webserver. The session timeout within 30sec or less eventhough i had code :- Session("Login") = userLogin in pageA - Session.Timeout = 60 (in pageB & pageC during pageload!) If Session(Login) = Nothing Then respone.redirect(PageA) Else ............... Although I set the session timeout in web.config as well, it didn't work Pls Help! many Thanks!
Nour Abdel-Salam... A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
-
There can be number of reasons for the behaviour. Try using SessionMode as StateSever than InProc. As InProc is not reliable. But make sure one thing that: ASP.net State Service is running on server.
Amandeep Singh Bhullar wrote:
As InProc is not reliable.
I disagree. What made you to say it is not reliable?
Navaneeth How to use google | Ask smart questions
-
Dear all... I'm handling a login form, where let the user to login in pageA before entering pageB or pageC. When running at localhost, everything was fine. Now the problem is when i put into the webserver. The session timeout within 30sec or less eventhough i had code :- Session("Login") = userLogin in pageA - Session.Timeout = 60 (in pageB & pageC during pageload!) If Session(Login) = Nothing Then respone.redirect(PageA) Else ............... Although I set the session timeout in web.config as well, it didn't work Pls Help! many Thanks!
Nour Abdel-Salam... A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
nour123 wrote:
The session timeout within 30sec or less eventhough i had code
Then you have some serious issues in your code. Are you sure the session is set correctly? Also try the points which I pointed out here[^]
Navaneeth How to use google | Ask smart questions
-
Amandeep Singh Bhullar wrote:
As InProc is not reliable.
I disagree. What made you to say it is not reliable?
Navaneeth How to use google | Ask smart questions
The prime reason I've seen InProc session being lost is if the app pool is recycled, or IIS is reset because the process that holds the session is lost. With a state server or a state database the session is held outside the process meaning it survives these two events. Also, if you have some daft bugger decide to configure a WebFarm to use InProc state then you will really have some interesting problems.
Developer Day Scotland 2 - Free community conference Recent blog posts: *Throwing Exceptions *Training Developers * Method hiding or overriding - or the difference between new and virtual
-
The prime reason I've seen InProc session being lost is if the app pool is recycled, or IIS is reset because the process that holds the session is lost. With a state server or a state database the session is held outside the process meaning it survives these two events. Also, if you have some daft bugger decide to configure a WebFarm to use InProc state then you will really have some interesting problems.
Developer Day Scotland 2 - Free community conference Recent blog posts: *Throwing Exceptions *Training Developers * Method hiding or overriding - or the difference between new and virtual
Colin Angus Mackay wrote:
InProc session being lost is if the app pool is recycled, or IIS is reset because the process that holds the session is lost.
That's right. I have also seen antivirus programs making problems by scanning the configuration files and assemblies.
Navaneeth How to use google | Ask smart questions
-
nour123 wrote:
The session timeout within 30sec or less eventhough i had code
Then you have some serious issues in your code. Are you sure the session is set correctly? Also try the points which I pointed out here[^]
Navaneeth How to use google | Ask smart questions
-
Colin Angus Mackay wrote:
InProc session being lost is if the app pool is recycled, or IIS is reset because the process that holds the session is lost.
That's right. I have also seen antivirus programs making problems by scanning the configuration files and assemblies.
Navaneeth How to use google | Ask smart questions
thanks 4 your reply... i tried this it gives me an error........ sessionState mode="StateServer" stateConnectionString="tcpip=65.182.97.156:42424" cookieless="false" timeout="20" thanx...
Nour Abdel-Salam... A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
-
Thanks for you friends I used but also i didn't work, why it works in my own iis, and doesn't work in the web host? :mad: :mad: :mad:
Nour Abdel-Salam... A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
nour123 wrote:
why it works in my own iis, and doesn't work in the web host?
Because they are configured differently? Because it wasn't uploaded properly? Becuase the security context is different? Because you weren't actually using IIS on your machine? (A lot of people mistake Visual Studio's build in web server for IIS. It is different and it responds in subtly different ways) Any number of reasons.
Developer Day Scotland 2 - Free community conference Recent blog posts: *Throwing Exceptions *Training Developers * Method hiding or overriding - or the difference between new and virtual
-
thanks 4 your reply... i tried this it gives me an error........ sessionState mode="StateServer" stateConnectionString="tcpip=65.182.97.156:42424" cookieless="false" timeout="20" thanx...
Nour Abdel-Salam... A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
nour123 wrote:
it gives me an error........
What is the error, you have only detailed your configuration settings.
Developer Day Scotland 2 - Free community conference Recent blog posts: *Throwing Exceptions *Training Developers * Method hiding or overriding - or the difference between new and virtual
-
nour123 wrote:
it gives me an error........
What is the error, you have only detailed your configuration settings.
Developer Day Scotland 2 - Free community conference Recent blog posts: *Throwing Exceptions *Training Developers * Method hiding or overriding - or the difference between new and virtual
thanks 4 reply... I wrote: sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="20" / the error is... Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.
Nour Abdel-Salam... A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
-
thanks 4 reply... I wrote: sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="20" / the error is... Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.
Nour Abdel-Salam... A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)