473,387 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
Nov 19 '05 #1
2 1415
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

Nov 19 '05 #2
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


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: leegold2 | last post by:
Probably a newbie question about "state": My problem is I have a search form, so user enters a keyword <enter>, then this form posts to another page were the result are displayed. But this...
0
by: Dinesh Upare | last post by:
Hi, I want to fire events of Datatgrid without maintaining the view state. If I disable the ViewState then the events are not fired. The reason I don't want to maintain view state is because its...
1
by: Novice | last post by:
Hey all, I have finally managed to create a Custom WebControl and am using a technique from another programmer to maintain state between pages - I would just like to validate this idea. ...
1
by: Robert Burdick [eMVP] | last post by:
Hello All: I am writing an ASP.NET application that will take the user to PayPal to make some payments. Before going to PayPal, I collect relevant user information and store it in a session...
1
by: Deepson Thomas | last post by:
Hi, Currently iam facing a strange problem.. One dropdown in my page is keeping itz state after postback. Whichever the item i selected is not the selected item after postback. it goes back to the...
5
by: Deepson Thomas | last post by:
Hi, Currently iam facing a strange problem.. One dropdown in my page is not keeping itz state after postback. Whichever the item i select irrespective of that after the post-back the default...
1
by: clintonG | last post by:
I'm having a problem maintaining state with a Panel control in a MasterPage and I need help thinking through this process. The basic structure of the HTML in the Master looks like this... ...
0
by: mark.norgate | last post by:
Hi I'm having a problem in adding controls to a page programmatically in response to a button click. Composite user controls added programmatically in the CreateChildControls() method work...
4
by: Sam | last post by:
I have an asp.net 2.0 app that uses a sitemap, Master Page, and has several content pages. While this feature has simplified the process of creating a data-driven site menu, it does seem to have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.