WindowsApplication and FormsAuthentication?

Discussion in 'ASP .Net Security' started by Chad Yoshikawa, Nov 18, 2003.

  1. I have a WebService that is using FormsAuthentication (setup in the
    web.config file) as follows:

    <authentication mode="Forms">
    <forms name=".ASPXAUTH" loginUrl="https://foo.com/Register/Login.aspx"
    protection="All" timeout="30" path="/" />
    </authentication>

    Accessing the web service via a browser is fine, because the user can
    access the login page (which has a username/password form on it).

    I want to be able to access the WebService using a WindowsApplication as
    well. I'd like to use the same FormsAuthentication if possible. The
    question I have, is how to go about doing this? My best guess is: I
    would need to POST the username and password to the Login page, get back
    the Cookie (a FormsAuthenticationTicket), and then add this cookie to
    the WebService.CookiesContainer.

    Does this sound right? Any suggestions would be much appreciated.
    Thank you,

    -Chad

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Chad Yoshikawa, Nov 18, 2003
    #1
    1. Advertising

  2. Hi Chad,

    Thanks for posting to the newsgroup.

    Have you looked at WS-Security, part of the Web Services Enhancements (WSE)
    available from Microsoft?
    http://www.microsoft.com/downloads/...9a-c5f6-4c95-87b7-fc7ab49b3edd&displaylang=en

    It's not forms authentication, but it's a much more direct route to security
    for Web services.

    Hope this helps,
    bliz

    --
    Jim Blizzard, MCSD .NET
    Community Developer Evangelist | http://www.microsoft.com/communities
    Microsoft

    Your Potential. Our Passion.

    This posting is provided as is, without warranty, and confers no rights.

    "Chad Yoshikawa" <> wrote in message
    news:...
    >
    >
    > I have a WebService that is using FormsAuthentication (setup in the
    > web.config file) as follows:
    >
    > <authentication mode="Forms">
    > <forms name=".ASPXAUTH" loginUrl="https://foo.com/Register/Login.aspx"
    > protection="All" timeout="30" path="/" />
    > </authentication>
    >
    > Accessing the web service via a browser is fine, because the user can
    > access the login page (which has a username/password form on it).
    >
    > I want to be able to access the WebService using a WindowsApplication as
    > well. I'd like to use the same FormsAuthentication if possible. The
    > question I have, is how to go about doing this? My best guess is: I
    > would need to POST the username and password to the Login page, get back
    > the Cookie (a FormsAuthenticationTicket), and then add this cookie to
    > the WebService.CookiesContainer.
    >
    > Does this sound right? Any suggestions would be much appreciated.
    > Thank you,
    >
    > -Chad
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Jim Blizzard [MSFT], Nov 19, 2003
    #2
    1. Advertising

  3. Thanks for the help - I'll check out the WSE 2.0

    -Chad

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Chad Yoshikawa, Nov 20, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darren Clark

    FormsAuthentication and session_end

    Darren Clark, May 25, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    597
    Guest
    May 25, 2004
  2. Gawel
    Replies:
    2
    Views:
    501
    Joerg Jooss
    Aug 1, 2004
  3. Harrie Verveer
    Replies:
    2
    Views:
    1,382
    Richard Myers
    Jun 27, 2005
  4. Joe

    FormsAuthentication and Session

    Joe, Aug 1, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,937
    Patrick.O.Ige
    Aug 2, 2005
  5. =?Utf-8?B?TWlrZQ==?=
    Replies:
    0
    Views:
    961
    =?Utf-8?B?TWlrZQ==?=
    Aug 31, 2005
Loading...

Share This Page