autheticate a domain user from the web application hosted on another domain

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jaydeep Ramavat
    New Member
    • Jul 2009
    • 12

    autheticate a domain user from the web application hosted on another domain

    Dear friends,

    I have two domain servers X and Y.
    My Asp.net Web application is hosted on Domain X.

    But my scope is required to authorize the user of Domain Y on the Web application hosted on Domain X server.

    I am using Windows Authetication mode in application.

    Is it possible?

    Regards
    Jay Ramavat.
  • PsychoCoder
    Recognized Expert Contributor
    • Jul 2010
    • 465

    #2
    My first suggestion would be to use ASP.NET cookies and set the Domain property when setting the cookie.

    So when they log in on server X create a cookie

    Code:
    Response.Cookies("authenticated").Value = True
    Response.Cookies("domain").Expires = DateTime.Now.AddDays(1)
    Response.Cookies("domain").Domain = "http://www.y.com"
    Then when they reach domain Y check for that cookie

    Code:
    If Not Request.Cookies("authenticated") Is Nothing Then
        Dim authenticatedCookie As HttpCookie = Request.Cookies("authenticated")
        If CType(authenticationCookie.Value, Boolean) Then
        	'Do what you need here
        End If    
    End If

    Comment

    • Jaydeep Ramavat
      New Member
      • Jul 2009
      • 12

      #3
      Actually We are using Windows Server 2003 as a Domain (Active Directory) Server, and i am developing the Intranet Site.

      I just want to put the windows authetication using Active directory of the Windows Server 2003.

      But ASP.NET application is located on one server, and i am required to autheticate user from other Active directory of Windows 2003 server.


      Thanks.

      Comment

      Working...