User Authentication between two websites

S

shil

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.
 
C

Cowboy \(Gregory A. Beamer\)

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top