473,408 Members | 2,832 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,408 software developers and data experts.

Shared login authentication between two domains?!

Hi all,

We have a site called http://www.mydomainxyz.com/ and our network guy
has set up load balancing with multiple IIS servers. We also have a
function that allows users to upload photos on our website. Recently
we found that doing load balancing will cause the upload function not
workable sometimes and we came up with a plan by creating a specific
domain (let's say http://upload.mydomainxyz.com/) and linking it to
our primary web server. We expect that every uploaded pictures will be
stored under the folder of our primary IIS server. But here comes my
problem -

Since all users are required to login before uploading pictures, We
found that the new domain cannot carry over the login information that
our www domain already knows. In other words, if our users log in
http://www.mydomainxyz.com/, they have to login again when they switch
to the page beginning with upload. Is there any way that these two
domain can share the same login information without requiring them to
input login information again?

The http://upload.mydomainxyz.com/ will only be used for uploading
pictures only. All other pages we will use the www domain.

Here is what I did when login to www.mydomainxyz.com -

<%
set rs=server.createobject("adodb.recordset")
sql="select ID, username, pass from registration where username='" &
request("username") & "' and password='" & request("password")& "'"
set rs = conn.execute(sql)
if not rs.eof then
'Login cookies
response.cookies("login_situation")="OK"
response.cookies("login_name")=rs("username")
response.cookies("login_userid")=rs("Id")
else
response.redirect ("../login.asp")
end if

%>

Oct 30 '07 #1
1 3726
<ta********@gmail.comwrote in message
news:11**********************@v3g2000hsg.googlegro ups.com...
Hi all,

We have a site called http://www.mydomainxyz.com/ and our network guy
has set up load balancing with multiple IIS servers. We also have a
function that allows users to upload photos on our website. Recently
we found that doing load balancing will cause the upload function not
workable sometimes and we came up with a plan by creating a specific
domain (let's say http://upload.mydomainxyz.com/) and linking it to
our primary web server. We expect that every uploaded pictures will be
stored under the folder of our primary IIS server. But here comes my
problem -

Since all users are required to login before uploading pictures, We
found that the new domain cannot carry over the login information that
our www domain already knows. In other words, if our users log in
http://www.mydomainxyz.com/, they have to login again when they switch
to the page beginning with upload. Is there any way that these two
domain can share the same login information without requiring them to
input login information again?

The http://upload.mydomainxyz.com/ will only be used for uploading
pictures only. All other pages we will use the www domain.

Here is what I did when login to www.mydomainxyz.com -

<%
set rs=server.createobject("adodb.recordset")
sql="select ID, username, pass from registration where username='" &
request("username") & "' and password='" & request("password")& "'"
set rs = conn.execute(sql)
if not rs.eof then
'Login cookies
response.cookies("login_situation")="OK"
response.cookies("login_name")=rs("username")
response.cookies("login_userid")=rs("Id")
else
response.redirect ("../login.asp")
end if

%>
Don't create multiple cookies use a single multi value cookie like this:-

Set oLogonCookie = Response.Cookies("Logon")
oLogonCookie("state") = "ok"
oLogonCookie("username") = rs("username")
oLogonCookie("userId") = rs("id")
oLogonCookie.Domain = "mydomainxyz.com"

Note the domain property above will cause the cookie to be sent with
requests for any host in the domain (i.e., both upload and www will receive
the cookie regardless of which created it).

--
Anthony Jones - MVP ASP/ASP.NET
Oct 30 '07 #2

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

Similar topics

3
by: Chris | last post by:
I am new to setting up SQL Server and would greatly appreciate if someone can help me out with this issue: I have successfully set up SQL Server but want to be able for clients of mine to be...
2
by: TBone | last post by:
Anyone, I have a user "john" whose machine is part of the "job" domain. He is trying to establish an odbc connection to an MS SQL 2000 server on the "school" domain. He uses Windows...
1
by: Sean C. | last post by:
Helpful folks, We have been having an intermittent and completely unreproducable problem concerning user authentication on Windows 2000: SQL1403N The username and/or password supplied is...
3
by: masoud bayan | last post by:
Hi, We have 3 different web applications on three different websites (and domains). Now we want to make it possible for users to login in each of these applications and can navigate to other...
2
by: raagz | last post by:
Hi, I am developing an intranet portal and i have used Windows Authentication. The application is hosted on a windows 2003 server with .NET Framework 1.1. I have set the session timeout to 20...
27
by: Javier Martinez | last post by:
Hi I have asp application in a machine with a virtual directory referring a shared directory in another machine When I try to load any aspx page of my portal I get the following error: ...
3
by: arun.hallan | last post by:
Hi, I'm having problems with authentication. I have a set of users that are allowed to use a webpage. They are in domain A. My goal is to get the username of these users and then check them...
2
by: JDC | last post by:
Hi all, I have an ASP.NET application for which I'd like the "login" page to be secure. The problem I have is that while my hosting company gives me a "secure" option, secure pages appear under...
6
by: =?Utf-8?B?UGFyYWcgR2Fpa3dhZA==?= | last post by:
Hi All, We have a requirement where we have to develop a custom Login Page which will accept user's NT credentials ( Username , password, domain name). This then needs to be passed to a website...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.