<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: WCF Username Authentication</title>
	<atom:link href="http://www.devatwork.nl/2007/05/wcf-username-authentication/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devatwork.nl/2007/05/wcf-username-authentication/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wcf-username-authentication</link>
	<description>A day in the life of a developer</description>
	<lastBuildDate>Tue, 31 Jan 2012 10:19:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: WCF Username and Password (Security) &#38;&#38; (Membership) &#171; cesarcastrocuba</title>
		<link>http://www.devatwork.nl/2007/05/wcf-username-authentication/comment-page-2/#comment-11926</link>
		<dc:creator>WCF Username and Password (Security) &#38;&#38; (Membership) &#171; cesarcastrocuba</dc:creator>
		<pubDate>Thu, 22 Sep 2011 11:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.devatwork.nl/index.php/2007/05/31/wcf-username-authentication/#comment-11926</guid>
		<description>[...] http://www.devatwork.nl/2007/05/wcf-username-authentication/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.devatwork.nl/2007/05/wcf-username-authentication/" rel="nofollow">http://www.devatwork.nl/2007/05/wcf-username-authentication/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: An easy way to create a self signed certificate &#171; Peter Thok</title>
		<link>http://www.devatwork.nl/2007/05/wcf-username-authentication/comment-page-2/#comment-7929</link>
		<dc:creator>An easy way to create a self signed certificate &#171; Peter Thok</dc:creator>
		<pubDate>Thu, 14 Apr 2011 21:53:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.devatwork.nl/index.php/2007/05/31/wcf-username-authentication/#comment-7929</guid>
		<description>[...] service with username authentication in my dev environment (if you need help with this, I recommend http://www.devatwork.nl/2007/05/wcf-username-authentication/). Tried using Windows makecert cmd utility but it was give me problems. So I found a nifty tool [...]</description>
		<content:encoded><![CDATA[<p>[...] service with username authentication in my dev environment (if you need help with this, I recommend <a href="http://www.devatwork.nl/2007/05/wcf-username-authentication/" rel="nofollow">http://www.devatwork.nl/2007/05/wcf-username-authentication/</a>). Tried using Windows makecert cmd utility but it was give me problems. So I found a nifty tool [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harold Chattaway</title>
		<link>http://www.devatwork.nl/2007/05/wcf-username-authentication/comment-page-2/#comment-6311</link>
		<dc:creator>Harold Chattaway</dc:creator>
		<pubDate>Sat, 23 Oct 2010 03:30:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.devatwork.nl/index.php/2007/05/31/wcf-username-authentication/#comment-6311</guid>
		<description>hello!

The process of passing credentials via wcf was a major pain. This article seems to have addressed the issues quite nicely. I was able to get the sample app working right away.

But, when I copy the app/web.config settings to my own project, using the same certificate, the service call fails with the error:
&quot;Content Type application/soap+xml; charset=utf-8 was not supported by service http://slcdevelopment/slcservices/slcservices.svc.  The client and service bindings may be mismatched. &quot;&quot;

The bindings on both ends are exactly the same as in the demo. When I switch my project back to use basichttpbinding, it works fine.

I put a breakpoint in the Myx509Validator method, and that does not seem to be even reached.

Are there any &quot;usual suspects&quot; that can cause something like this to happen?
Thanks for the great work!
Harold</description>
		<content:encoded><![CDATA[<p>hello!</p>
<p>The process of passing credentials via wcf was a major pain. This article seems to have addressed the issues quite nicely. I was able to get the sample app working right away.</p>
<p>But, when I copy the app/web.config settings to my own project, using the same certificate, the service call fails with the error:<br />
&#8220;Content Type application/soap+xml; charset=utf-8 was not supported by service <a href="http://slcdevelopment/slcservices/slcservices.svc" rel="nofollow">http://slcdevelopment/slcservices/slcservices.svc</a>.  The client and service bindings may be mismatched. &#8220;&#8221;</p>
<p>The bindings on both ends are exactly the same as in the demo. When I switch my project back to use basichttpbinding, it works fine.</p>
<p>I put a breakpoint in the Myx509Validator method, and that does not seem to be even reached.</p>
<p>Are there any &#8220;usual suspects&#8221; that can cause something like this to happen?<br />
Thanks for the great work!<br />
Harold</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Petr</title>
		<link>http://www.devatwork.nl/2007/05/wcf-username-authentication/comment-page-2/#comment-5797</link>
		<dc:creator>Petr</dc:creator>
		<pubDate>Mon, 02 Aug 2010 09:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.devatwork.nl/index.php/2007/05/31/wcf-username-authentication/#comment-5797</guid>
		<description>Why certificate generated by makecert should be used for testing purposes only?

Thanks Petr</description>
		<content:encoded><![CDATA[<p>Why certificate generated by makecert should be used for testing purposes only?</p>
<p>Thanks Petr</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Okello</title>
		<link>http://www.devatwork.nl/2007/05/wcf-username-authentication/comment-page-2/#comment-5796</link>
		<dc:creator>Martin Okello</dc:creator>
		<pubDate>Mon, 02 Aug 2010 09:03:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.devatwork.nl/index.php/2007/05/31/wcf-username-authentication/#comment-5796</guid>
		<description>At last I managed to encode my configs. Could you spot what is wrong with my configs as certificates on the localhost machine threw exceptions as mentioned above. here are my configs.


     Server Config:
 &lt;system.serviceModel&gt;

    &lt;serviceHostingEnvironment&gt;
      &lt;baseAddressPrefixFilters&gt;
        &lt;add prefix=&quot;http://localhost/MartinLayooInc/MartinLayooChatService/&quot; /&gt;
      &lt;/baseAddressPrefixFilters&gt;
    &lt;/serviceHostingEnvironment&gt;

    &lt;bindings&gt;
      &lt;basicHttpBinding&gt;
        &lt;binding name=&quot;MyBasicHttpBinding&quot; sendTimeout=&quot;00:05:00&quot; receiveTimeout=&quot;00:20:00&quot;&gt;
          &lt;security mode=&quot;Message&quot;&gt;
            &lt;message clientCredentialType=&quot;UserName&quot;/&gt;
          &lt;/security&gt;
        &lt;/binding&gt;
      &lt;/basicHttpBinding&gt;
    &lt;/bindings&gt;

    &lt;services&gt;
      &lt;!-- This section is optional with the new configuration model
           introduced in .NET Framework 4. --&gt;
      &lt;service name=&quot;MartinLayooChatService.PubSubService&quot; behaviorConfiguration=&quot;MartinLayooChatBehavior&quot;&gt;
        &lt;host&gt;
          &lt;baseAddresses&gt;
            &lt;add baseAddress=&quot;http://localhost/MartinLayooInc/MartinLayooChatService/MartinChatService.svc&quot; /&gt;
          &lt;/baseAddresses&gt;
        &lt;/host&gt;
        &lt;!-- this endpoint is exposed at the base address provided by host: http://epsilonx:8000/ServiceModelSamples/service  --&gt;
        &lt;endpoint address=&quot;http://localhost/MartinLayooInc/MartinLayooChatService/MartinChatService.svc&quot; binding=&quot;wsDualHttpBinding&quot; contract=&quot;MartinLayooChatService.IMartinChatService&quot;/&gt;
        &lt;!-- the mex endpoint is exposed at http://epsilonx:8000/ServiceModelSamples/service/mex --&gt;
        &lt;endpoint contract=&quot;IMetadataExchange&quot; binding=&quot;mexHttpBinding&quot; address=&quot;http://epsilonx/MartinLayooInc/MartinLayooChatService/mex&quot;/&gt;
      &lt;/service&gt;
    &lt;/services&gt;
    &lt;behaviors&gt;
      &lt;endpointBehaviors&gt;
          &lt;behavior name=&quot;myClientBehavior&quot;&gt;
            &lt;clientCredentials&gt;
              &lt;serviceCertificate&gt;
                &lt;authentication certificateValidationMode=&quot;Custom&quot; customCertificateValidatorType=&quot;ValidatorService.MyX509Validator,ValidatorService&quot; /&gt;
              &lt;/serviceCertificate&gt;
            &lt;/clientCredentials&gt;
          &lt;/behavior&gt;
      &lt;/endpointBehaviors&gt;
      &lt;serviceBehaviors&gt;
        &lt;behavior name=&quot;MartinLayooChatBehavior&quot;&gt;
          &lt;serviceCredentials&gt;
            &lt;serviceCertificate findValue=&quot;epsilonx&quot; x509FindType=&quot;FindBySubjectName&quot; storeLocation=&quot;LocalMachine&quot; storeName=&quot;My&quot; /&gt;            
            &lt;userNameAuthentication userNamePasswordValidationMode=&quot;Custom&quot; customUserNamePasswordValidatorType=&quot;ValidatorService.MyCustomValidator,ValidatorService&quot;/&gt;
            &lt;clientCertificate&gt;
              &lt;authentication certificateValidationMode=&quot;None&quot; /&gt;
            &lt;/clientCertificate&gt;
          &lt;/serviceCredentials&gt;
          &lt;serviceMetadata httpGetEnabled=&quot;true&quot; httpGetUrl=&quot;http://localhost/MartinLayooInc/MartinLayooChatService/MartinChatService.svc&quot; /&gt;
          &lt;serviceDebug includeExceptionDetailInFaults=&quot;False&quot; /&gt;
        &lt;/behavior&gt;
      &lt;/serviceBehaviors&gt;
    &lt;/behaviors&gt;
    &lt;client&gt;
      &lt;endpoint address=&quot;http://localhost/MartinLayooInc/MartinLayooChatService/MartinChatService.svc&quot; behaviorConfiguration=&quot;myClientBehavior&quot; binding=&quot;wsHttpBinding&quot; bindingConfiguration=&quot;MyBasicHttpBinding&quot; contract=&quot;MartinLayooChatService.IMartinChatService&quot; name=&quot;MyBasicHttpBinding&quot; &gt;
        &lt;identity&gt;
          &lt;dns value=&quot;epsilonx&quot;/&gt;
        &lt;/identity&gt;
      &lt;/endpoint&gt;
    &lt;/client&gt;
  &lt;/system.serviceModel&gt;
 
    
    Client Config: 
    
      &lt;system.serviceModel&gt; 
    &lt;bindings&gt; 
      &lt;wsDualHttpBinding&gt; 
        &lt;binding name=&quot;WSDualHttpBinding_IMartinChatService&quot; closeTimeout=&quot;00:05:00&quot;
            openTimeout=&quot;00:02:00&quot; receiveTimeout=&quot;00:20:00&quot; sendTimeout=&quot;00:05:00&quot;
            bypassProxyOnLocal=&quot;false&quot; transactionFlow=&quot;false&quot; hostNameComparisonMode=&quot;StrongWildcard&quot;
            maxBufferPoolSize=&quot;5242880&quot; maxReceivedMessageSize=&quot;65536&quot;
            messageEncoding=&quot;Text&quot; textEncoding=&quot;utf-8&quot; useDefaultWebProxy=&quot;true&quot;&gt; 
          &lt;readerQuotas maxDepth=&quot;32&quot; maxStringContentLength=&quot;8192&quot; maxArrayLength=&quot;16384&quot;
              maxBytesPerRead=&quot;4096&quot; maxNameTableCharCount=&quot;16384&quot; /&gt; 
          &lt;reliableSession ordered=&quot;true&quot; inactivityTimeout=&quot;00:10:00&quot; /&gt; 
          &lt;security mode=&quot;Message&quot;&gt; 
            &lt;message clientCredentialType=&quot;UserName&quot; negotiateServiceCredential=&quot;False&quot; /&gt; 
          &lt;/security&gt; 
        &lt;/binding&gt; 
      &lt;/wsDualHttpBinding&gt; 
    &lt;/bindings&gt; 
    &lt;client&gt; 
      &lt;endpoint address=&quot;http://localhost/martinlayooinc/MartinLayooChatService/MartinChatService.svc&quot;
          binding=&quot;wsDualHttpBinding&quot; bindingConfiguration=&quot;WSDualHttpBinding_IMartinChatService&quot;
          contract=&quot;IMartinChatService&quot; name=&quot;WSDualHttpBinding_IMartinChatService&quot;&gt; 
        &lt;identity&gt; 
          &lt;servicePrincipalName value=&quot;host/EPSILONX&quot; /&gt; 
        &lt;/identity&gt; 
      &lt;/endpoint&gt; 
    &lt;/client&gt; 
  &lt;/system.serviceModel&gt;
    
    </description>
		<content:encoded><![CDATA[<p>At last I managed to encode my configs. Could you spot what is wrong with my configs as certificates on the localhost machine threw exceptions as mentioned above. here are my configs.</p>
<p>     Server Config:<br />
 &lt;system.serviceModel&gt;</p>
<p>    &lt;serviceHostingEnvironment&gt;<br />
      &lt;baseAddressPrefixFilters&gt;<br />
        &lt;add prefix=&#8221;http://localhost/MartinLayooInc/MartinLayooChatService/&#8221; /&gt;<br />
      &lt;/baseAddressPrefixFilters&gt;<br />
    &lt;/serviceHostingEnvironment&gt;</p>
<p>    &lt;bindings&gt;<br />
      &lt;basicHttpBinding&gt;<br />
        &lt;binding name=&#8221;MyBasicHttpBinding&#8221; sendTimeout=&#8221;00:05:00&#8243; receiveTimeout=&#8221;00:20:00&#8243;&gt;<br />
          &lt;security mode=&#8221;Message&#8221;&gt;<br />
            &lt;message clientCredentialType=&#8221;UserName&#8221;/&gt;<br />
          &lt;/security&gt;<br />
        &lt;/binding&gt;<br />
      &lt;/basicHttpBinding&gt;<br />
    &lt;/bindings&gt;</p>
<p>    &lt;services&gt;<br />
      &lt;!&#8211; This section is optional with the new configuration model<br />
           introduced in .NET Framework 4. &#8211;&gt;<br />
      &lt;service name=&#8221;MartinLayooChatService.PubSubService&#8221; behaviorConfiguration=&#8221;MartinLayooChatBehavior&#8221;&gt;<br />
        &lt;host&gt;<br />
          &lt;baseAddresses&gt;<br />
            &lt;add baseAddress=&#8221;http://localhost/MartinLayooInc/MartinLayooChatService/MartinChatService.svc&#8221; /&gt;<br />
          &lt;/baseAddresses&gt;<br />
        &lt;/host&gt;<br />
        &lt;!&#8211; this endpoint is exposed at the base address provided by host: <a href="http://epsilonx:8000/ServiceModelSamples/service" rel="nofollow">http://epsilonx:8000/ServiceModelSamples/service</a>  &#8211;&gt;<br />
        &lt;endpoint address=&#8221;http://localhost/MartinLayooInc/MartinLayooChatService/MartinChatService.svc&#8221; binding=&#8221;wsDualHttpBinding&#8221; contract=&#8221;MartinLayooChatService.IMartinChatService&#8221;/&gt;<br />
        &lt;!&#8211; the mex endpoint is exposed at <a href="http://epsilonx:8000/ServiceModelSamples/service/mex" rel="nofollow">http://epsilonx:8000/ServiceModelSamples/service/mex</a> &#8211;&gt;<br />
        &lt;endpoint contract=&#8221;IMetadataExchange&#8221; binding=&#8221;mexHttpBinding&#8221; address=&#8221;http://epsilonx/MartinLayooInc/MartinLayooChatService/mex&#8221;/&gt;<br />
      &lt;/service&gt;<br />
    &lt;/services&gt;<br />
    &lt;behaviors&gt;<br />
      &lt;endpointBehaviors&gt;<br />
          &lt;behavior name=&#8221;myClientBehavior&#8221;&gt;<br />
            &lt;clientCredentials&gt;<br />
              &lt;serviceCertificate&gt;<br />
                &lt;authentication certificateValidationMode=&#8221;Custom&#8221; customCertificateValidatorType=&#8221;ValidatorService.MyX509Validator,ValidatorService&#8221; /&gt;<br />
              &lt;/serviceCertificate&gt;<br />
            &lt;/clientCredentials&gt;<br />
          &lt;/behavior&gt;<br />
      &lt;/endpointBehaviors&gt;<br />
      &lt;serviceBehaviors&gt;<br />
        &lt;behavior name=&#8221;MartinLayooChatBehavior&#8221;&gt;<br />
          &lt;serviceCredentials&gt;<br />
            &lt;serviceCertificate findValue=&#8221;epsilonx&#8221; x509FindType=&#8221;FindBySubjectName&#8221; storeLocation=&#8221;LocalMachine&#8221; storeName=&#8221;My&#8221; /&gt;<br />
            &lt;userNameAuthentication userNamePasswordValidationMode=&#8221;Custom&#8221; customUserNamePasswordValidatorType=&#8221;ValidatorService.MyCustomValidator,ValidatorService&#8221;/&gt;<br />
            &lt;clientCertificate&gt;<br />
              &lt;authentication certificateValidationMode=&#8221;None&#8221; /&gt;<br />
            &lt;/clientCertificate&gt;<br />
          &lt;/serviceCredentials&gt;<br />
          &lt;serviceMetadata httpGetEnabled=&#8221;true&#8221; httpGetUrl=&#8221;http://localhost/MartinLayooInc/MartinLayooChatService/MartinChatService.svc&#8221; /&gt;<br />
          &lt;serviceDebug includeExceptionDetailInFaults=&#8221;False&#8221; /&gt;<br />
        &lt;/behavior&gt;<br />
      &lt;/serviceBehaviors&gt;<br />
    &lt;/behaviors&gt;<br />
    &lt;client&gt;<br />
      &lt;endpoint address=&#8221;http://localhost/MartinLayooInc/MartinLayooChatService/MartinChatService.svc&#8221; behaviorConfiguration=&#8221;myClientBehavior&#8221; binding=&#8221;wsHttpBinding&#8221; bindingConfiguration=&#8221;MyBasicHttpBinding&#8221; contract=&#8221;MartinLayooChatService.IMartinChatService&#8221; name=&#8221;MyBasicHttpBinding&#8221; &gt;<br />
        &lt;identity&gt;<br />
          &lt;dns value=&#8221;epsilonx&#8221;/&gt;<br />
        &lt;/identity&gt;<br />
      &lt;/endpoint&gt;<br />
    &lt;/client&gt;<br />
  &lt;/system.serviceModel&gt;</p>
<p>    Client Config: </p>
<p>      &lt;system.serviceModel&gt;<br />
    &lt;bindings&gt;<br />
      &lt;wsDualHttpBinding&gt;<br />
        &lt;binding name=&#8221;WSDualHttpBinding_IMartinChatService&#8221; closeTimeout=&#8221;00:05:00&#8243;<br />
            openTimeout=&#8221;00:02:00&#8243; receiveTimeout=&#8221;00:20:00&#8243; sendTimeout=&#8221;00:05:00&#8243;<br />
            bypassProxyOnLocal=&#8221;false&#8221; transactionFlow=&#8221;false&#8221; hostNameComparisonMode=&#8221;StrongWildcard&#8221;<br />
            maxBufferPoolSize=&#8221;5242880&#8243; maxReceivedMessageSize=&#8221;65536&#8243;<br />
            messageEncoding=&#8221;Text&#8221; textEncoding=&#8221;utf-8&#8243; useDefaultWebProxy=&#8221;true&#8221;&gt;<br />
          &lt;readerQuotas maxDepth=&#8221;32&#8243; maxStringContentLength=&#8221;8192&#8243; maxArrayLength=&#8221;16384&#8243;<br />
              maxBytesPerRead=&#8221;4096&#8243; maxNameTableCharCount=&#8221;16384&#8243; /&gt;<br />
          &lt;reliableSession ordered=&#8221;true&#8221; inactivityTimeout=&#8221;00:10:00&#8243; /&gt;<br />
          &lt;security mode=&#8221;Message&#8221;&gt;<br />
            &lt;message clientCredentialType=&#8221;UserName&#8221; negotiateServiceCredential=&#8221;False&#8221; /&gt;<br />
          &lt;/security&gt;<br />
        &lt;/binding&gt;<br />
      &lt;/wsDualHttpBinding&gt;<br />
    &lt;/bindings&gt;<br />
    &lt;client&gt;<br />
      &lt;endpoint address=&#8221;http://localhost/martinlayooinc/MartinLayooChatService/MartinChatService.svc&#8221;<br />
          binding=&#8221;wsDualHttpBinding&#8221; bindingConfiguration=&#8221;WSDualHttpBinding_IMartinChatService&#8221;<br />
          contract=&#8221;IMartinChatService&#8221; name=&#8221;WSDualHttpBinding_IMartinChatService&#8221;&gt;<br />
        &lt;identity&gt;<br />
          &lt;servicePrincipalName value=&#8221;host/EPSILONX&#8221; /&gt;<br />
        &lt;/identity&gt;<br />
      &lt;/endpoint&gt;<br />
    &lt;/client&gt;<br />
  &lt;/system.serviceModel&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Okello</title>
		<link>http://www.devatwork.nl/2007/05/wcf-username-authentication/comment-page-2/#comment-5787</link>
		<dc:creator>Martin Okello</dc:creator>
		<pubDate>Sat, 31 Jul 2010 23:48:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.devatwork.nl/index.php/2007/05/31/wcf-username-authentication/#comment-5787</guid>
		<description>Actually I have decided to post my config files under this Url: Could someone please look at it and tell me where I going wrong.

http://www.martinlayooinc.co.uk/WCFConfigs.aspx</description>
		<content:encoded><![CDATA[<p>Actually I have decided to post my config files under this Url: Could someone please look at it and tell me where I going wrong.</p>
<p><a href="http://www.martinlayooinc.co.uk/WCFConfigs.aspx" rel="nofollow">http://www.martinlayooinc.co.uk/WCFConfigs.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Okello</title>
		<link>http://www.devatwork.nl/2007/05/wcf-username-authentication/comment-page-2/#comment-5786</link>
		<dc:creator>Martin Okello</dc:creator>
		<pubDate>Sat, 31 Jul 2010 23:31:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.devatwork.nl/index.php/2007/05/31/wcf-username-authentication/#comment-5786</guid>
		<description>Ok it is a poor question board. You can&#039;t paste xhtml, and therefore my config files won&#039;t show. However if any body would like to give me a hand, I can email them my config settings: both Client and Server. I am stuck with this one, and very new to WCF.

Thanks in advance.

Martin Okello.</description>
		<content:encoded><![CDATA[<p>Ok it is a poor question board. You can&#8217;t paste xhtml, and therefore my config files won&#8217;t show. However if any body would like to give me a hand, I can email them my config settings: both Client and Server. I am stuck with this one, and very new to WCF.</p>
<p>Thanks in advance.</p>
<p>Martin Okello.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Okello</title>
		<link>http://www.devatwork.nl/2007/05/wcf-username-authentication/comment-page-2/#comment-5785</link>
		<dc:creator>Martin Okello</dc:creator>
		<pubDate>Sat, 31 Jul 2010 23:28:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.devatwork.nl/index.php/2007/05/31/wcf-username-authentication/#comment-5785</guid>
		<description>Wonder why my Server/client config settings haven&#039;t been posted as I copied and pasted them. I will try again.

Server Config:



    
      
        
      
    

    
      
        
          
            
          
        
      
    

    
      
      
        
          
            
          
        
        &lt;!-- this endpoint is exposed at the base address provided by host: http://epsilonx:8000/ServiceModelSamples/service  --&gt;
        
        &lt;!-- the mex endpoint is exposed at http://epsilonx:8000/ServiceModelSamples/service/mex --&gt;
        
      
    
    
      
        
          
            
            
            
              
            
          
          
          
        
      
    
    
      
        
          
        
      
    
  </description>
		<content:encoded><![CDATA[<p>Wonder why my Server/client config settings haven&#8217;t been posted as I copied and pasted them. I will try again.</p>
<p>Server Config:</p>
<p>        <!-- this endpoint is exposed at the base address provided by host: <a href="http://epsilonx:8000/ServiceModelSamples/service" rel="nofollow">http://epsilonx:8000/ServiceModelSamples/service  &#8211;></p>
<p>        <!-- the mex endpoint is exposed at <a href="http://epsilonx:8000/ServiceModelSamples/service/mex" rel="nofollow">http://epsilonx:8000/ServiceModelSamples/service/mex &#8211;></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Okello</title>
		<link>http://www.devatwork.nl/2007/05/wcf-username-authentication/comment-page-2/#comment-5784</link>
		<dc:creator>Martin Okello</dc:creator>
		<pubDate>Sat, 31 Jul 2010 23:25:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.devatwork.nl/index.php/2007/05/31/wcf-username-authentication/#comment-5784</guid>
		<description>Hi There,

I followed your procedure, nearly to the word, and have problems connecting client to Server. My client is a Winforms application and the Server a WCF application on my Server.

When I was testing on local host prior to using Certificates everything worked fine. Unfortunately implementing the Certificates as you explained, failed for me when opening a connnection to the server. Here are my config files both Server and Client plus snippets of code on client to connect.

I was hoping that only the server required a certificate, and not the client. I don&#039;t have a client certificate in my case, and since I am using the By pass Cert validation you mentioned in your tutorial, I did not expect this error message below. Could someone help please.

Does anybody know why I get an exception: The service certificate is not provided for target &#039;http://localhost/martinlayooinc/MartinLayooChatService/MartinChatService.svc&#039;. Specify a service certificate in ClientCredentials. 

Server Config:



    
      
        
      
    

    
      
        
          
            
          
        
      
    

    
      
      
        
          
            
          
        
        &lt;!-- this endpoint is exposed at the base address provided by host: http://epsilonx:8000/ServiceModelSamples/service  --&gt;
        
        &lt;!-- the mex endpoint is exposed at http://epsilonx:8000/ServiceModelSamples/service/mex --&gt;
        
      
    
    
      
        
          
            
            
            
              
            
          
          
          
        
      
    
    
      
        
          
        
      
    
  

Client Config:

  
    
      
        
          
          
          
            
          
        
      
    
    
      
        
          
        
      
    
  


Client Connect Code snippet:


            InstanceContext context = new InstanceContext(new ServiceCallBack());
            client = new MartinChatServiceClient(context);
            client.ClientCredentials.UserName.UserName = &quot;martinokello&quot;;
            client.ClientCredentials.UserName.Password = &quot;deltax$505&quot;;

            // These two are needed if you don&#039;t have fully signed/trusted certs
            client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;
          
            try
            {
                client.Open();
                client.Subscribe();
                BasicHttpBinding binding = new BasicHttpBinding(&quot;BasicHttpBinding_IMartinChatService&quot;);
                chatServiceCF = new DuplexChannelFactory(context, binding);
                IMartinChatService clientServ = chatServiceCF.CreateChannel(context, new EndpointAddress(&quot;http://localhost/martinlayooinc/MartinLayooChatService/MartinChatService.svc&quot;));
                ((ICommunicationObject)clientServ).Faulted += new EventHandler(ProxyServiceFactory_Faulted);
            }
            catch (FaultException e)
            {
                string errorMessageFromService = e.Detail.ExceptionString;
                client.Close();
            }
            catch (Exception ex)
            {
                Console.Out.WriteLine(ex.Message + ex.StackTrace);
            }</description>
		<content:encoded><![CDATA[<p>Hi There,</p>
<p>I followed your procedure, nearly to the word, and have problems connecting client to Server. My client is a Winforms application and the Server a WCF application on my Server.</p>
<p>When I was testing on local host prior to using Certificates everything worked fine. Unfortunately implementing the Certificates as you explained, failed for me when opening a connnection to the server. Here are my config files both Server and Client plus snippets of code on client to connect.</p>
<p>I was hoping that only the server required a certificate, and not the client. I don&#8217;t have a client certificate in my case, and since I am using the By pass Cert validation you mentioned in your tutorial, I did not expect this error message below. Could someone help please.</p>
<p>Does anybody know why I get an exception: The service certificate is not provided for target &#8216;<a href="http://localhost/martinlayooinc/MartinLayooChatService/MartinChatService.svc&#039;" rel="nofollow">http://localhost/martinlayooinc/MartinLayooChatService/MartinChatService.svc&#039;</a>. Specify a service certificate in ClientCredentials. </p>
<p>Server Config:</p>
<p>        <!-- this endpoint is exposed at the base address provided by host: <a href="http://epsilonx:8000/ServiceModelSamples/service" rel="nofollow">http://epsilonx:8000/ServiceModelSamples/service  &#8211;></p>
<p>        <!-- the mex endpoint is exposed at <a href="http://epsilonx:8000/ServiceModelSamples/service/mex" rel="nofollow">http://epsilonx:8000/ServiceModelSamples/service/mex &#8211;></p>
<p>Client Config:</p>
<p>Client Connect Code snippet:</p>
<p>            InstanceContext context = new InstanceContext(new ServiceCallBack());<br />
            client = new MartinChatServiceClient(context);<br />
            client.ClientCredentials.UserName.UserName = &#8220;martinokello&#8221;;<br />
            client.ClientCredentials.UserName.Password = &#8220;deltax$505&#8243;;</p>
<p>            // These two are needed if you don&#8217;t have fully signed/trusted certs<br />
            client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;</p>
<p>            try<br />
            {<br />
                client.Open();<br />
                client.Subscribe();<br />
                BasicHttpBinding binding = new BasicHttpBinding(&#8220;BasicHttpBinding_IMartinChatService&#8221;);<br />
                chatServiceCF = new DuplexChannelFactory(context, binding);<br />
                IMartinChatService clientServ = chatServiceCF.CreateChannel(context, new EndpointAddress(&#8220;http://localhost/martinlayooinc/MartinLayooChatService/MartinChatService.svc&#8221;));<br />
                ((ICommunicationObject)clientServ).Faulted += new EventHandler(ProxyServiceFactory_Faulted);<br />
            }<br />
            catch (FaultException e)<br />
            {<br />
                string errorMessageFromService = e.Detail.ExceptionString;<br />
                client.Close();<br />
            }<br />
            catch (Exception ex)<br />
            {<br />
                Console.Out.WriteLine(ex.Message + ex.StackTrace);<br />
            }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko</title>
		<link>http://www.devatwork.nl/2007/05/wcf-username-authentication/comment-page-2/#comment-5622</link>
		<dc:creator>Marko</dc:creator>
		<pubDate>Wed, 09 Jun 2010 22:20:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.devatwork.nl/index.php/2007/05/31/wcf-username-authentication/#comment-5622</guid>
		<description>I have to use WindowsGroups authentication for one endpoint of my service(named pipe) and also a custom user name authentication for another (wsHttpBinding, just like in your article). How would I go about configuring my service?

Thanks</description>
		<content:encoded><![CDATA[<p>I have to use WindowsGroups authentication for one endpoint of my service(named pipe) and also a custom user name authentication for another (wsHttpBinding, just like in your article). How would I go about configuring my service?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

