[Mono-dev] WCF and TransportCredentialOnly

Atsushi Eno atsushieno at veritas-vos-liberabit.com
Tue Feb 15 22:01:58 EST 2011


This is not for general mono users list but for those who hack mono itself.
Check mono-list instead and you'll find very similar question there (unless
you are the same person who posted that in fact).

Atsushi Eno

(2011/02/16 5:07), rjhdakota wrote:
> I am working on a WCF service in MONO and currently testing it under MAC OS.
> I had 2.8 but updated to the latest in SVN. My service is allowing
> connections no matter how I set it up. Is user authentication supported?
> Here is my service, note that it works fine in Windows and I can validate
> user/pass with my custom validation function. On the MAC, my client always
> connects, no challenge to the user/pass. Am I missing a property?
>
> Public Sub WCFStartService()
>          ' http service, one-way
>
>          Dim binding = New
> BasicHttpBinding(System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly)
>          binding.Security.Transport.ClientCredentialType =
> HttpClientCredentialType.Basic
>
>          Dim address = New Uri("http://192.168.1.129:8080")
>          ServiceHost = New ServiceHost(GetType(HelloService))
>
>
> ServiceHost.Credentials.UserNameAuthentication.UserNamePasswordValidationMode
> = Security.UserNamePasswordValidationMode.Custom
>
> ServiceHost.Credentials.UserNameAuthentication.CustomUserNamePasswordValidator
> = New CustomUserNameValidator
>
>          ServiceHost.AddServiceEndpoint(GetType(IHelloService), binding,
> address)
>          ServiceHost.Open()
>      End Sub



More information about the Mono-devel-list mailing list