Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Maintaining state between 2 domains

 
Thread Tools Search this Thread
Old 04-28-2005, 06:29 PM   #1
Default Maintaining state between 2 domains


I'm writing a web site for a friend. The site is going to have to
consist of two ASP.NET applications: one running over HTTP and one
over HTTPS. The problem is that the domains will be different, so how
do I maintain state between the public area (http://www.mydomain.com)
and the secure area (https://secure.myisp.com/mydomain)?

What I'm trying to achieve here is for the site user to login to the
site in the secure area, and then have a GUID that identifies the
user's "session" that can be accessed by pages from either
application. When I've done this in the past I've just stored a value
in a cookie, but that's always been on sites where both applications
are on the same domain - that's not the case this time.

Any suggestions?

Any help will be gratefully received.

Pete


Pete
  Reply With Quote
Old 04-29-2005, 04:40 PM   #2
=?Utf-8?B?UmljaA==?=
 
Posts: n/a
Default RE: Maintaining state between 2 domains
About the only way I can think of accomplishing this is to have a gateway
page on each of the domains that passes the session var's back and forth. As
your clients move from one domain to the next, you would need to force them
thru the appropriate gateway page. For example:

------------------------
Link from non-secure to secure:
------------------------
<a href='https://secure.myisp.com/mydomain/gateway.aspx?var1=a&var2=b'>Click
here for secure access</a>

https://secure.myisp.com/mydomain/gateway.aspx would contain the following
code:

session("var1")=request("var1")
session("var2")=request("var1")
response.redirect "default.aspx"

------------------------
Link from secure to non-secure:
------------------------
<a href='http://www.mydomain.com/gateway.aspx?var1=a&var2=b'>Click here for
non-secure access</a>

http://www.mydomain.com/gateway.aspx would contain the following code:

session("var1")=request("var1")
session("var2")=request("var1")
response.redirect "default.aspx"

Hope this helps..... Rich

"Pete" wrote:

> I'm writing a web site for a friend. The site is going to have to
> consist of two ASP.NET applications: one running over HTTP and one
> over HTTPS. The problem is that the domains will be different, so how
> do I maintain state between the public area (http://www.mydomain.com)
> and the secure area (https://secure.myisp.com/mydomain)?
>
> What I'm trying to achieve here is for the site user to login to the
> site in the secure area, and then have a GUID that identifies the
> user's "session" that can be accessed by pages from either
> application. When I've done this in the past I've just stored a value
> in a cookie, but that's always been on sites where both applications
> are on the same domain - that's not the case this time.
>
> Any suggestions?
>
> Any help will be gratefully received.
>
> Pete
>



=?Utf-8?B?UmljaA==?=
  Reply With Quote
Old 04-30-2005, 01:54 PM   #3
peter@cozens.net
 
Posts: n/a
Default Re: Maintaining state between 2 domains
I was hoping there might have been a slightly more "invisible" solution
in .NET, but this one looks pretty tidy so I'll give it a go.

Thanks for your help,

Pete

Rich wrote:
> About the only way I can think of accomplishing this is to have a

gateway
> page on each of the domains that passes the session var's back and

forth. As
> your clients move from one domain to the next, you would need to

force them
> thru the appropriate gateway page. For example:
>
> ------------------------
> Link from non-secure to secure:
> ------------------------
> <a

href='https://secure.myisp.com/mydomain/gateway.aspx?var1=a&var2=b'>Click

> here for secure access</a>
>
> https://secure.myisp.com/mydomain/gateway.aspx would contain the

following
> code:
>
> session("var1")=request("var1")
> session("var2")=request("var1")
> response.redirect "default.aspx"
>
> ------------------------
> Link from secure to non-secure:
> ------------------------
> <a href='http://www.mydomain.com/gateway.aspx?var1=a&var2=b'>Click

here for
> non-secure access</a>
>
> http://www.mydomain.com/gateway.aspx would contain the following

code:
>
> session("var1")=request("var1")
> session("var2")=request("var1")
> response.redirect "default.aspx"
>
> Hope this helps..... Rich
>
> "Pete" wrote:
>
> > I'm writing a web site for a friend. The site is going to have to
> > consist of two ASP.NET applications: one running over HTTP and one
> > over HTTPS. The problem is that the domains will be different, so

how
> > do I maintain state between the public area

(http://www.mydomain.com)
> > and the secure area (https://secure.myisp.com/mydomain)?
> >
> > What I'm trying to achieve here is for the site user to login to

the
> > site in the secure area, and then have a GUID that identifies the
> > user's "session" that can be accessed by pages from either
> > application. When I've done this in the past I've just stored a

value
> > in a cookie, but that's always been on sites where both

applications
> > are on the same domain - that's not the case this time.
> >
> > Any suggestions?
> >
> > Any help will be gratefully received.
> >
> > Pete
> >




peter@cozens.net
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using BRAM in state machines zoki111 Hardware 0 09-18-2007 09:38 AM
Judge: File-swapping tools are legal Citizen Bob DVD Video 140 11-08-2006 06:42 PM
web cookies are not maintaining state -D- A+ Certification 3 04-24-2006 03:55 PM
DVD Verdict reviews: THE PACIFIER, STATE PROPERTY 2, and more! DVD Verdict DVD Video 0 07-22-2005 09:11 AM
BUSH WILL LIKELY INSTALL A DRAFT Jas DVD Video 165 10-20-2004 09:39 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46