Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello everyone.

 

I have created an asp.net application. The application works great on my local machine; however, when I run the app on a different server, the session variables are not being maintained. I have tried session state mode = InProc and StateServer. Is there a setting on the server that I am missing? Thanks for the help.

Posted

I assume so, since the app works on my local machine. I have tried both InProc and StateServer (turned the ASP service on for this as well) for the mode. I just created a simple test app. 2 pages. One sets the session variable - Session("Test") = "1" and the other justs displays it with a label - label.text = Session("Test").

This does not work either, so it has to be something with the server. What else is there that I can check. Thanks for the help.

Posted

i have done a little more testing.

in the application_start i created - application("Test") = 0

in session_start i have - application("Test") += 1

in session_end i have - application("Test") += 1

 

when i run the app using my machine as the local server

i get on page two

 

label1 = 1 (session("Test")) and

label2 = 1 (application("Test"))

This above is correct; however on the company server on page two i get

 

label1 = nothing (session("Test")) and

label2 = 3 (application("Test"))

Can anyone tell me why this happening. session_start i assume is firing twice and session_end is firing once.

  • Administrators
Posted

Are you testing this from the same browser or are you running a different browser on each machine?

 

Could you also paste the session information from your web.config here - if possible both the version from the testing machine and the one from the server.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

The browser I test with is the same. I test the client side from my machine. The only thing that is changing is the server. The session info is the same on both machines.

 

<sessionState

mode="StateServer"

stateConnectionString="tcpip=127.0.0.1:42424"

sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"

cookieless="false"

timeout="20"

/>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...