[Mono-bugs] [Bug 605795] New: WCF Authentication using Basic Auth doesn't work in MonoTouch.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu May 13 20:08:58 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=605795

http://bugzilla.novell.com/show_bug.cgi?id=605795#c0


           Summary: WCF Authentication using Basic Auth doesn't work in
                    MonoTouch.
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: eduardoscoz at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User
           Blocker: No


WCF Authentication Issue with MonoTouch

Even though SSL access seem to work correctly with MonoTouch, when trying to
use Basic authentication the client fails with a Unauthorized message. 

The attached example contains a sample asp.net site with one WCF service
configured for Basic Auth and a page that access it directly to prove that
works. It also contains a MonoTouch example configured to use the same service,
and that always throws an Unauthorized error.



Steps To Reproduce the issue:

    1. - Open VS solution
    2. - Accept the creation of a new site in IIS


In IIS:

    3. - create a self signing certificate for SSL
        (IIS Manager-> click on host -> server certificates 
            -> Create self-signed certificate [right bar])


    4. - add bindings to https to the proper site, port will be 443
        (IIS Manager-> Default Web Site -> Bindings...[right bar])

    5. - for the current website, make sure you have Basic Authentication
enabled
        (IIS Manager->new virtual site created on [2] -> Authentication)

        (if you don't have BasicAuth in the list, you need to install it
        the Control Panel -> Add Windows Features)

    6. - restart IIS

In Visual Studio:

    7. - Edit Default.aspx.cs
        - change username, password (can be your local machine or domain)
    8. - Run the webapp and open Default.aspx.cs 

    9. - Click button. If you don't get a "this works" msg, it means something
is broken.

In MonoTouch:

    10. - Open the solution

    11. - Edit Main.cs, edit the URL to point to the VM, username and password

    12. - Run the app, you'll get a (401) exception in the console.

        - if you get any error other than (401)Unauthorized, it means something
            is not configured properly.To me, the most common issues 
            were with the IIS configuration.


        - if you get a "WORKED!!!" message in the console, it means you're
**GOD**, 
            and everybody should bow to you.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list