Can I pass ASP Basic Auth Credentials to an APS.NET Forms Authentication site?

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Can I pass ASP Basic Auth Credentials to an APS.NET Forms Authentication site?

    I am converting an ASP Website running Windows NT 4.0 to ASP.NET running
    Windows 2000 on a different computer across the Internet. During this
    process, both will be active and availble to users.

    The ASP site A uses Basic Authentication and has the user enter a UserID and
    Password that are Authenticated against a database.

    The ASP.NET site N uses Forms Authentication and has the user enter a UserID
    and Password that are Authenticated against a copy of the ASP's database.

    At this point in time I am only concerned with the scenario as follows:

    - User Logs in to Site A (ASP)
    - Site A redirects the User to Site N (ASP.NET)

    In this scenario, the User has to enter their UserID and Password a second
    time when accessing Site N.

    Can Site A programitically pass the credentials, UserID and Password, to
    Site N so the user does not have to logon a second time with the same UserID
    and Password without changing the authentication schemes of either site.

    If so, what are my options?

    Thanks,
    Doug


    Douglas J. Badin Guest

  2. Similar Questions and Discussions

    1. Pass credentials from one web site to another for seamless login
      I have a partner company that has a web site that I need to gain access through the web site in my company. I need to be able to log into my site...
    2. ASP.Net Forms authentication & Windows Auth combined
      I have a situation where I would like to use forms authentication and windows authentication combined. Basically, I would like to use a form to...
    3. ASP.Net Forms authentication with basic authentication popup
      Relatively new to ASP.Net but have a strange problem. My site uses forms authentication for a large administration section however after the user...
    4. how to by-pass forms authentication in a subfolder
      Hello, I have an application with forms authentication setting specified in the web.config of the app root; so all users must login before they...
    5. Basic Forms Authentication question
      I can't get this damn thing to work at all. I have a virtual directory set up with anonymous access only, web.config contains the following but...
  3. #2

    Default RE: Can I pass ASP Basic Auth Credentials to an APS.NET Forms Authentication site?

    Hello Douglas,

    Thanks for posting in the group.

    Based on my understanding, now the question is: You have one asp
    application which uses basic authentication and one asp.net applicaiton
    which uses forms authentication. The user ID and password database is the
    same for these two web applications. Now, - User Logs in to Site A (ASP) by
    using user name and passoword, Site A redirects the User to Site N
    (ASP.NET). Can Site A programitically pass the credentials, UserID and
    Password, to
    Site N so the user does not have to logon a second time? Please correct me
    if I have misunderstood anything.

    Here I thought of a method. Since we are using basic authentication in Site
    A (ASP), so we can get username and password in ASP web application first
    and store it in the cookie. When the Site A redirectes users to Site N
    (ASP.NET), it will redirect to forms authentication auto-login page. In the
    Page_Load of that page, we can fetch the user name and password from cookie
    and authenticate the user programmatically. So the client doesn't need to
    input username and password again.

    Does that answer your question? If there is any unclear, please feel free
    to post here.

    Ps: In ASP programming, if we use basic authentication, we can only use
    username and password in NT domain. What database do you mean in the
    sentence "The ASP site A uses Basic Authentication and has the user enter a
    UserID and Password that are Authenticated against a database."? Do you
    mean authenticate the user name and password in NT domain?

    Best regards,
    Yanhong Huang
    Microsoft Community Support

    Get Secure! ¨C [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Yan-Hong Huang[MSFT] Guest

  4. #3

    Default Re: Can I pass ASP Basic Auth Credentials to an APS.NET Forms Authentication site?

    Hi Yanhong Huang,

    You understand correctly.

    The database of usernames and password is SQL Server and you are correct in
    assuming I can get the Username and Password.

    Your idea sounds interesting. I will have to check it out. The only
    concern I have is that it will be a cross-domain cookie. Site A and N are
    two different boxes in different locations. Right now I redirect to the IP
    of Site N.

    Thanks,

    Doug

    "Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message
    news:Dg$BY874DHA.568@cpmsftngxa07.phx.gbl...
    > Hello Douglas,
    >
    > Thanks for posting in the group.
    >
    > Based on my understanding, now the question is: You have one asp
    > application which uses basic authentication and one asp.net applicaiton
    > which uses forms authentication. The user ID and password database is the
    > same for these two web applications. Now, - User Logs in to Site A (ASP)
    by
    > using user name and passoword, Site A redirects the User to Site N
    > (ASP.NET). Can Site A programitically pass the credentials, UserID and
    > Password, to
    > Site N so the user does not have to logon a second time? Please correct me
    > if I have misunderstood anything.
    >
    > Here I thought of a method. Since we are using basic authentication in
    Site
    > A (ASP), so we can get username and password in ASP web application first
    > and store it in the cookie. When the Site A redirectes users to Site N
    > (ASP.NET), it will redirect to forms authentication auto-login page. In
    the
    > Page_Load of that page, we can fetch the user name and password from
    cookie
    > and authenticate the user programmatically. So the client doesn't need to
    > input username and password again.
    >
    > Does that answer your question? If there is any unclear, please feel free
    > to post here.
    >
    > Ps: In ASP programming, if we use basic authentication, we can only use
    > username and password in NT domain. What database do you mean in the
    > sentence "The ASP site A uses Basic Authentication and has the user enter
    a
    > UserID and Password that are Authenticated against a database."? Do you
    > mean authenticate the user name and password in NT domain?
    >
    > Best regards,
    > Yanhong Huang
    > Microsoft Community Support
    >
    > Get Secure! ¨C [url]www.microsoft.com/security[/url]
    > This posting is provided "AS IS" with no warranties, and confers no
    rights.
    >

    Douglas J. Badin Guest

  5. #4

    Default Re: Can I pass ASP Basic Auth Credentials to an APS.NET Forms Authentication site?

    Hello Douglas,

    Thanks very much for the quick update.

    If the Site A and N's DNS name is different, for an example, [url]www.sitea.com[/url]
    and [url]www.siten.com[/url], the cookie can't work, because the cookie is based on
    DNS name. If the name of DNS is different, the cookie will look on them as
    different web sites and they won't share the cookies.

    Another way is to transfer username and password in QueryString, such as
    [url]www.siten.com\login.aspx?username=****&password=** **[/url]. Then in Page_Load of
    login.aspx, we can use NameValueCollection coll=Request.QueryString to get
    the username and password. Surely we can use some algorithm to secure the
    username and password when putting it in QueryString.

    If there is anything unclear, please feel free to post here.

    By the way, we can send post notify email to you when there is useful reply
    in the newsgroup. If you want to receive it in the future, please register
    your no spam email alias at
    [url]http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp[/url]
    &SD=msdn.

    Best regards,
    Yanhong Huang
    Microsoft Community Support

    Get Secure! ¨C [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Yan-Hong Huang[MSFT] Guest

  6. #5

    Default Re: Can I pass ASP Basic Auth Credentials to an APS.NET Forms Authentication site?

    Hello Douglas,

    I wanted to post a quick note to see if you would like additional
    assistance or information regarding this particular issue. If there is
    anything unclear, please feel free to post here.

    Thanks for participating the community.

    Best regards,
    Yanhong Huang
    Microsoft Community Support

    Get Secure! ¨C [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Yan-Hong Huang[MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139