Problem with pages talking between two servers

B

Brent

Hi,
I have a problem. We have web applications on 2 seperate servers that need
to talk to each other. App 1 needs to pop open a second windos with App2 in
it where you choose a value and that is returned to App1. The problem is
that when we try to call App1 from App2 with a value say in it's address
string (page.aspx?id=xxx) we have no way of keeping our session variables in
App1 (To verify we still have the same user logged in to app1 as well as
other variables). We've worked around this by App1 looping while app2 is
running and then having app2 just write to a database and then have app1
keep checking the db for the value, but that is not nice. Any ideas?
 
G

Gary Hunt

Brent,

Although I've no idea of the scenario it sounds like you ought to just
expose the functionality of App2 via remoting to App1....

Tell us a bit more about what you're trying to do...

cheers,

g
 
B

Brent

Umm, I'll try to explain better. I need the second app to completely run on
the other server, because it is a mapping program that people will choose
locations on a map. I then need to pass the value of that location back to
my app without it losing it's session.
 
G

Gary Hunt

Hmmm,

Ok - understand the issue now - can you not configure it like you would for
a webfarm with the session state being held in a SQL server DB - or does SQL
licensing rule that one out?

I guess the alternative would be to serialise the session and pass it either
on the URL or via a form post and have the "App2" understand a passed in
session from App1. It's gonna get more closely coupled than you'd like it I
guess.

Not much help I'm afraid,

cheers,

g
 
B

Brent

OK, passing the serialized session sounds good to me. Can you point me at
some examples of how to do this exactly?
Thanks,
 
T

Todd

Don't know if this will help or not, but maybe you'll get something
out of it to help your situation...

I had a similar problem. I didn't so much care to maintain the
session, but rather I wanted to have a seamless login from one
application to another and pass certain info. Couldn't get the
session to pass from one app to the next. You already mentioned that
you used a SQL DB to pass the info, and that is how I solved my issue.
It safe and secure.

A user logs into Application #1, I create an object that can hold any
relevant info (session info or Business info). When the user clicks
on a link to jump to Application #2: the first step I do is clear the
DB table of old info (if any exists), next I populate the DB table
with any relevant info I wish to pass (user info, session info,
business info, whatever...), next I redirect to Application #2 with a
URL variable that acts as a "flag" for the Page Load event in App 2 to
catch. This block of code in the Page Load event (if
url.flag_variable exists then...) calls the DB and populates an object
within App #2. Now anything I had in App #1 that I wanted to use in
App #2 exists as part of #2. The last step after populating the
object is to delete the record from the DB table.

You can use this logic to jump back and forth from one app to another.
Nothing needs to be passed in the URL, other than some dummy variable
that triggers a block of code to read the DB and populate an object.
Because you always delete at the end of this operation, there is never
sensitive info remaining in the DB. Obviously, depending on your
program's structure you would want to "tweak" this to suit your
program's needs. Good Luck.
 
Joined
Jul 7, 2006
Messages
1
Reaction score
0
Todd said:
Don't know if this will help or not, but maybe you'll get something
out of it to help your situation...

I had a similar problem. I didn't so much care to maintain the
session, but rather I wanted to have a seamless login from one
application to another and pass certain info. Couldn't get the
session to pass from one app to the next. You already mentioned that
you used a SQL DB to pass the info, and that is how I solved my issue.
It safe and secure.

A user logs into Application #1, I create an object that can hold any
relevant info (session info or Business info). When the user clicks
on a link to jump to Application #2: the first step I do is clear the
DB table of old info (if any exists), next I populate the DB table
with any relevant info I wish to pass (user info, session info,
business info, whatever...), next I redirect to Application #2 with a
URL variable that acts as a "flag" for the Page Load event in App 2 to
catch. This block of code in the Page Load event (if
url.flag_variable exists then...) calls the DB and populates an object
within App #2. Now anything I had in App #1 that I wanted to use in
App #2 exists as part of #2. The last step after populating the
object is to delete the record from the DB table.

You can use this logic to jump back and forth from one app to another.
Nothing needs to be passed in the URL, other than some dummy variable
that triggers a block of code to read the DB and populate an object.
Because you always delete at the end of this operation, there is never
sensitive info remaining in the DB. Obviously, depending on your
program's structure you would want to "tweak" this to suit your
program's needs. Good Luck.
>
> "Brent" <[email protected]> wrote in message
> news:[email protected]...
> > Umm, I'll try to explain better. I need the second app to completely run

> on
> > the other server, because it is a mapping program that people will choose
> > locations on a map. I then need to pass the value of that location back to
> > my app without it losing it's session.
> >
I am having two fifferent applications running in two dirrerent servers. One application in one server1 is JAVA based and the one in another server2 is ASP.NET application. Now i need to invoke the asp.net in server2 from the java application in server1.

Can you suggest me the way to work out this.
 

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,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top