Problem with pages talking between two servers | | |
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? | | | | re: Problem with pages talking between two servers
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
"Brent" <b@b.com> wrote in message
news:107o5fk4keou70b@corp.supernews.com...[color=blue]
> 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[/color]
in[color=blue]
> 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[/color]
in[color=blue]
> 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?
>
>[/color] | | | | re: Problem with pages talking between two servers
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.
"Gary Hunt" <betaplace@codequest.co.uk> wrote in message
news:OblczZXIEHA.3248@TK2MSFTNGP12.phx.gbl...[color=blue]
> 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
>
>
> "Brent" <b@b.com> wrote in message
> news:107o5fk4keou70b@corp.supernews.com...[color=green]
> > Hi,
> > I have a problem. We have web applications on 2 seperate servers that[/color][/color]
need[color=blue][color=green]
> > to talk to each other. App 1 needs to pop open a second windos with App2[/color]
> in[color=green]
> > 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[/color][/color]
variables[color=blue]
> in[color=green]
> > 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?
> >
> >[/color]
>
>[/color] | | | | re: Problem with pages talking between two servers
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
"Brent" <b@b.com> wrote in message
news:107oah8eglpc544@corp.supernews.com...[color=blue]
> Umm, I'll try to explain better. I need the second app to completely run[/color]
on[color=blue]
> 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.
>
> "Gary Hunt" <betaplace@codequest.co.uk> wrote in message
> news:OblczZXIEHA.3248@TK2MSFTNGP12.phx.gbl...[color=green]
> > 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
> >
> >
> > "Brent" <b@b.com> wrote in message
> > news:107o5fk4keou70b@corp.supernews.com...[color=darkred]
> > > Hi,
> > > I have a problem. We have web applications on 2 seperate servers that[/color][/color]
> need[color=green][color=darkred]
> > > to talk to each other. App 1 needs to pop open a second windos with[/color][/color][/color]
App2[color=blue][color=green]
> > in[color=darkred]
> > > it where you choose a value and that is returned to App1. The problem[/color][/color][/color]
is[color=blue][color=green][color=darkred]
> > > that when we try to call App1 from App2 with a value say in it's[/color][/color][/color]
address[color=blue][color=green][color=darkred]
> > > string (page.aspx?id=xxx) we have no way of keeping our session[/color][/color]
> variables[color=green]
> > in[color=darkred]
> > > App1 (To verify we still have the same user logged in to app1 as well[/color][/color][/color]
as[color=blue][color=green][color=darkred]
> > > other variables). We've worked around this by App1 looping while app2[/color][/color][/color]
is[color=blue][color=green][color=darkred]
> > > running and then having app2 just write to a database and then have[/color][/color][/color]
app1[color=blue][color=green][color=darkred]
> > > keep checking the db for the value, but that is not nice. Any ideas?
> > >
> > >[/color]
> >
> >[/color]
>
>[/color] | | | | re: Problem with pages talking between two servers
OK, passing the serialized session sounds good to me. Can you point me at
some examples of how to do this exactly?
Thanks,
"Gary Hunt" <betaplace@codequest.co.uk> wrote in message
news:e5ceNNYIEHA.2948@TK2MSFTNGP11.phx.gbl...[color=blue]
> Hmmm,
>
> Ok - understand the issue now - can you not configure it like you would[/color]
for[color=blue]
> a webfarm with the session state being held in a SQL server DB - or does[/color]
SQL[color=blue]
> licensing rule that one out?
>
> I guess the alternative would be to serialise the session and pass it[/color]
either[color=blue]
> 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[/color]
I[color=blue]
> guess.
>
> Not much help I'm afraid,
>
> cheers,
>
> g
>
>
>
> "Brent" <b@b.com> wrote in message
> news:107oah8eglpc544@corp.supernews.com...[color=green]
> > Umm, I'll try to explain better. I need the second app to completely run[/color]
> on[color=green]
> > the other server, because it is a mapping program that people will[/color][/color]
choose[color=blue][color=green]
> > locations on a map. I then need to pass the value of that location back[/color][/color]
to[color=blue][color=green]
> > my app without it losing it's session.
> >
> > "Gary Hunt" <betaplace@codequest.co.uk> wrote in message
> > news:OblczZXIEHA.3248@TK2MSFTNGP12.phx.gbl...[color=darkred]
> > > 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
> > >
> > >
> > > "Brent" <b@b.com> wrote in message
> > > news:107o5fk4keou70b@corp.supernews.com...
> > > > Hi,
> > > > I have a problem. We have web applications on 2 seperate servers[/color][/color][/color]
that[color=blue][color=green]
> > need[color=darkred]
> > > > to talk to each other. App 1 needs to pop open a second windos with[/color][/color]
> App2[color=green][color=darkred]
> > > in
> > > > it where you choose a value and that is returned to App1. The[/color][/color][/color]
problem[color=blue]
> is[color=green][color=darkred]
> > > > that when we try to call App1 from App2 with a value say in it's[/color][/color]
> address[color=green][color=darkred]
> > > > string (page.aspx?id=xxx) we have no way of keeping our session[/color]
> > variables[color=darkred]
> > > in
> > > > App1 (To verify we still have the same user logged in to app1 as[/color][/color][/color]
well[color=blue]
> as[color=green][color=darkred]
> > > > other variables). We've worked around this by App1 looping while[/color][/color][/color]
app2[color=blue]
> is[color=green][color=darkred]
> > > > running and then having app2 just write to a database and then have[/color][/color]
> app1[color=green][color=darkred]
> > > > keep checking the db for the value, but that is not nice. Any ideas?
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color] | | | | re: Problem with pages talking between two servers
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.[color=blue]
>
> "Brent" <b@b.com> wrote in message
> news:107oah8eglpc544@corp.supernews.com...[color=green]
> > Umm, I'll try to explain better. I need the second app to completely run[/color]
> on[color=green]
> > 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.
> >[/color][/color] |  | Similar C# / C Sharp bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,383 network members.
|