[Mono-dev] WCF basicHttpBinding with certificate based authentication fails

Andreas Mack andreas.mack at zkrd.de
Wed Jun 20 13:40:19 UTC 2012


I have successfully implemented and tested a simple wcf 'hello world'
service with basicHttpBinding on Mono 2.10.8.

If i try to limit the access via certificate based authentication i get
the following error (browser):

"When Message security is enabled in a BasicHttpBinding, the message
security credential type must be
BasicHttpMessageCredentialType.Certificate." (Error 500)

This is the relevant part of my Web.config:


         <service name="WcfBeispiel.HelloService"
            <endpoint address=""
                      contract="WcfBeispiel.IHelloService" />
            <endpoint contract="IMetadataExchange"
binding="mexHttpBinding" address="mex" />

            <behavior name="MyServiceTypeBehaviors">
               <serviceMetadata httpGetEnabled="true"/>
               <serviceDebug includeExceptionDetailInFaults="false"/>
                  <serviceCertificate findValue     = "optimastest.zkrd.de"
                                      storeLocation = "LocalMachine"
                                      storeName     = "My"
                                      x509FindType  = "FindBySubjectName" />
certificateValidationMode="ChainTrust" />
      <!--<serviceHostingEnvironment multipleSiteBindingsEnabled="true"

            <binding name="MyServiceBindingConfiguration" >
               <security mode = "Message">
                  <message clientCredentialType="Certificate"/>


Where should i set the message security credential type to
BasicHttpMessageCredentialType.Certificate if not in the bindings section?

Any help would be greatly appreciated!

More information about the Mono-devel-list mailing list