passing session variables from .NET web app to another?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a .NET web app for my company last year which allows customers to see parts of their account in our CRM database, this app uses session variables to store their account number and logged in status.

My boss wants me to create a separate web app in which the customer will log in to the site and fill out a form. When the customer submits the form, I want it to take them to their customer page in the main web app. The main issue I'm running into is that the session variable doesn't appear to be transferring from one web app to the other. In the main app, the pages check if the two session variables exists, and dumps the browser to the login page if they are not correct. I know the session cookies configured correctly in the new web app, but when I invoke Response.Redirect to the customer page on the main web app, I just dumps me out to the main web app's login page.

Is there any way I can transfer the Session["AccountNumber"] and Session["LoginStatus"] from the new web app to the main one?

Thanks in advance,

Andre
 
Database, File System. Web Service, Remoting...

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Andre Ranieri said:
I created a .NET web app for my company last year which allows customers
to see parts of their account in our CRM database, this app uses session
variables to store their account number and logged in status.
My boss wants me to create a separate web app in which the customer will
log in to the site and fill out a form. When the customer submits the form,
I want it to take them to their customer page in the main web app. The main
issue I'm running into is that the session variable doesn't appear to be
transferring from one web app to the other. In the main app, the pages check
if the two session variables exists, and dumps the browser to the login page
if they are not correct. I know the session cookies configured correctly in
the new web app, but when I invoke Response.Redirect to the customer page on
the main web app, I just dumps me out to the main web app's login page.
Is there any way I can transfer the Session["AccountNumber"] and
Session["LoginStatus"] from the new web app to the main one?
 
No. I'm saying that it is going to require more than memory to "pass data"
as the Application Domains are separate. You will need to hand the data off
to some persistence medium on the HD, and read it from the second app.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Andre Ranieri said:
Kevin,

Are you saying that the SQLServer method captures session state
information between separate web apps?
 
Andre,

First, check out:
http://www.codeproject.com/Purgatory/Sharing_session_state.asp

Otherwise, what I've done before is cryptographically [is that a word?]
encode some of the session variables (i.e. an account ID) and pass them via
querystring to a "landing page" on the main application which will lookup
the account info or any other needed information and recreate the session
variables, and then Response.Redirect the user on to the rest of the main
application.

Brandon

However, if you don't want to
Andre Ranieri said:
I created a .NET web app for my company last year which allows customers
to see parts of their account in our CRM database, this app uses session
variables to store their account number and logged in status.
My boss wants me to create a separate web app in which the customer will
log in to the site and fill out a form. When the customer submits the form,
I want it to take them to their customer page in the main web app. The main
issue I'm running into is that the session variable doesn't appear to be
transferring from one web app to the other. In the main app, the pages check
if the two session variables exists, and dumps the browser to the login page
if they are not correct. I know the session cookies configured correctly in
the new web app, but when I invoke Response.Redirect to the customer page on
the main web app, I just dumps me out to the main web app's login page.
Is there any way I can transfer the Session["AccountNumber"] and
Session["LoginStatus"] from the new web app to the main one?
 
Back
Top