WindowsApplication and FormsAuthentication?

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

  1. #1

    Default WindowsApplication and FormsAuthentication?



    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 [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Chad Yoshikawa Guest

  2. Similar Questions and Discussions

    1. FormsAuthentication
      Hi, i am using forms authentication in an ASP.NET project I am setting the Forms authentication cookie by using:...
    2. FormsAuthentication with non-IE browser
      Hi, I have implemented a SSO solution using FormsAuthentication. FormsAuthentication.GetRedirecturl method does redirect to the requested...
    3. BUG With FormsAuthentication
      The authentication cookie with custom user is not available or the user data is gone after a redirect. In other words all the examples on the net on...
    4. FormsAuthentication with Machine Name
      I had licked this problem once and it resurfaced and won't go away. When I browse to a site with my machine name FormsAuthetication appears to...
    5. FormsAuthentication - Changes in .Net Framework 1.1!?
      I am not sure what is causing this problem but I ran into it before. I did not spend time trying to solve it since we are still working in 1.0...
  3. #2

    Default Re: WindowsApplication and FormsAuthentication?

    Hi Chad,

    Thanks for posting to the newsgroup.

    Have you looked at WS-Security, part of the Web Services Enhancements (WSE)
    available from Microsoft?
    [url]http://www.microsoft.com/downloads/details.aspx?familyid=21fb9b9a-c5f6-4c95-87b7-fc7ab49b3edd&displaylang=en[/url]

    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 | [url]http://www.microsoft.com/communities[/url]
    Microsoft

    Your Potential. Our Passion.

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

    "Chad Yoshikawa" <chadyoshikawa@yahoo.com> wrote in message
    news:Oe7by1XrDHA.4004@TK2MSFTNGP11.phx.gbl...
    >
    >
    > 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 [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Jim Blizzard [MSFT] Guest

  4. #3

    Default Re: WindowsApplication and FormsAuthentication?



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

    -Chad

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Chad Yoshikawa 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