Session State and passing information between web applications

C

cmpcrand

Hi again.

I have created 2 web applications on the local server, in the form:

http://localserver/TestApp1
http://localserver/TestApp2

I have set both of these pages to run in SqlServer mode and have
executed the InstallSqlState script. I then set the web.config files on
both of the web applications so that they were the same:

<sessionState mode="SQLServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=localhost;user
id=ID;password=PASSWORD"
cookieless="false" />

What I have on the TestApp1 application is a page with a Textbox and a
button. When the button is clicked, the following occurs:

Session["test"] = testApp1TB.Text;
Response.Redirect("http://localhost/TestApp2/Default.aspx");

On TestApp2, there is a page with just a Textbox and I want the text
that was entered into the Textbox on TestApp1 to appear inside the
textbox.

if (Session["test"] != null)
testApp2TB.Text = "the information was sent"

I am assured that this is possible, but searching online hasn't proved
too useful. Hopefully someone can help me out.
 
G

Guest

Session State (even SQL Server mode) is application - specific, and
subsequent to that, user-specific. I am sure that there is a way to hack
your way out of this with SQL Server, but it isn't supported. Use some other
mechanism to share data between the two apps.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top