Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am stuck in generating proxy class for a asp.net service which is configured with x.509 certificate. when I tried to add through .Net IDE as "Service Reference" it works but getting problem when tried to generate using svcutil command. the error is like

> contractfilter mismatch at the end pointdispacher

I am using custom svc.exe.config file as
XML
<system.serviceModel>
    <client>
      <endpoint behaviorConfiguration="ClientCertificateBehavior"
                binding="wsHttpBinding"
                bindingConfiguration="Binding1"
                contract="IMetadataExchange"
                name="https" />
      </client>
    <bindings>
      <wsHttpBinding>
        <binding name="Binding1">
          <security mode="Transport">
            <transport clientCredentialType="Certificate" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <behaviors>
      <endpointBehaviors>
        <behavior name="ClientCertificateBehavior">
          <clientCredentials>
            <clientCertificate findValue="02 90 54"
                               storeLocation="CurrentUser"
                               storeName="TrustedPeople"
                               x509FindType="FindBySerialNumber" />
          </clientCredentials>
        </behavior>
      </endpointBehaviors>
    </behaviors>
  </system.serviceModel>

it has service configuration like:
XML
<service
name="RelayHealth.Interop.Services.ImsTransfer.ImsTransferService"
behaviorConfiguration="IMSTransferBehavior">
    <endpoint address="" binding="wsHttpBinding"
bindingConfiguration="ClientCertTransport" name="soap11"
contract="RelayHealth.Interop.Services.ImsTransfer.IImsTransfer" />
  </service>
    <behavior name="IMSTransferBehavior">
      <serviceAuthorization
serviceAuthorizationManagerType="RelayHealth.Interop.Services.IMSTransfe
r.IMSTransferAuthorizationManager,
RelayHealth.Interop.Services.ServiceContracts" />
      <serviceMetadata httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
      <serviceThrottling maxConcurrentCalls="6400"
maxConcurrentSessions="10000" />
      <dataContractSerializer maxItemsInObjectGraph="128000" />
      <serviceCredentials>
        <clientCertificate>
          <authentication trustedStoreLocation="LocalMachine"
revocationMode="Online" />
        </clientCertificate>
      </serviceCredentials>
    </behavior>


[edit] fixed code block [/edit]
Posted
Updated 1-Aug-11 14:15pm
v2
Comments
[no name] 1-Aug-11 8:13am    
Fix your formatting.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900