473,396 Members | 1,860 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,396 software developers and data experts.

User Authentication between two websites

Hi,

Is there any possibility to authenticate an user between two websites?
I have a website through which users login and get authenticated. In
the same website I link to a different website and would like to pass
userid to the second website. My question is I want to restrict users
from going to the second website directly without getting authenticated

from the first one. Is this possible?
I know we can do this using Forms Authentication if this is in one
website.
I used below code in the web.config file of second website.
<authentication mode="Forms">
<forms name="Upgrade"
loginUrl="http://www.firstwebsite.com/TestDirectory/Login.aspx"
protection="All" path="/">
</forms>
</authentication>
When I go to the second one directly, I get an error as below
******************************
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure
that it is spelled correctly.
Requested Url: /TestDirectlry/Login.aspx
******************************
Which appears the website is looking for /TestDirectory/Login.aspx in
the second web project.
Any help is appreciated.
Thanks.

Oct 5 '06 #1
1 1609
Potentially. It really depends on whether they are under the same domain
root. If so, you can easily set the same machine keys (which encrypt the
server token) and pull from the different sites. Session variables will not
transfer, but you can use the same token. NOTE, however, that you have to
maintain session state for both sites in the same pool to do this.

There are ways you can do this with disparate sites, but it is a royal pain
in the butt, due to security concerns.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"shil" <jo******@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hi,

Is there any possibility to authenticate an user between two websites?
I have a website through which users login and get authenticated. In
the same website I link to a different website and would like to pass
userid to the second website. My question is I want to restrict users
from going to the second website directly without getting authenticated

from the first one. Is this possible?
I know we can do this using Forms Authentication if this is in one
website.
I used below code in the web.config file of second website.
<authentication mode="Forms">
<forms name="Upgrade"
loginUrl="http://www.firstwebsite.com/TestDirectory/Login.aspx"
protection="All" path="/">
</forms>
</authentication>
When I go to the second one directly, I get an error as below
******************************
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure
that it is spelled correctly.
Requested Url: /TestDirectlry/Login.aspx
******************************
Which appears the website is looking for /TestDirectory/Login.aspx in
the second web project.
Any help is appreciated.
Thanks.

Oct 5 '06 #2

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

Similar topics

1
by: Mr_Ed | last post by:
Hi all, Ok this is a problem we have been having for quite a while and its finally coming to a head.... Ever since we have gone to a Windows 2000 server using IIS5 for our intranet we have had a...
1
by: anonymous | last post by:
Hi all, I've been searching the way to achieve the following task. But no luck so far. I have a web site(main site), which requires authentication. This authentication is set at Windows...
5
by: Matthew Louden | last post by:
I wrote ASP.NET application that access SQL Server database. When I run the application, it yields "Login failed for user '<COMPUTER_NAME>\ASPNET'" error message. I then did the following, but...
4
by: Zachary Hilbun | last post by:
I need to write an ASP that requires a user to give a User Name and Password to run it. Whenever I've used this on the Web it displays a standard dialog and then offers to save the User Name and...
2
by: BillGatesFan | last post by:
Maybe I'm doing this the wrong way. I have an application that you log into and it validates the username and password with the database using a stored proc and if the username and password is...
0
by: shil | last post by:
Hi, Is there any possibility to authenticate an user between two websites? I have a website through which users login and get authenticated. In the same website I link to a different website and...
9
by: webrod | last post by:
Hi all, how can I check a user/password in a LDAP ? I don't want to connect with this user, I would like to connect to LDAP with a ADMIN_LOG/ADMIN_PWD, then do a query to find the user and...
4
by: semi_evil | last post by:
I found a nice example of ebay login using PHP and cURL at http://curl.haxx.se/libcurl/php/examples/ Is this technique applicable to sites that authenticate users using a browser-opened dialog?...
14
by: chromis | last post by:
Hi, I've been trying to implement a more OOP oriented approach to dealing with user security on one of my websites, and I am trying to validate the user against an array of roles, however I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.