Search code examples
wcfvisual-studio-2013wsdl.net-4.5webservice-client

VS2013 generates wsdl as https with failing certificate for http wcf service and then fails to generate the client with svcutil.exe


I ran into peculiar issue, wcf service then ran in debug mode on VS2013 on http generates links and wsdl over https that run on different port.
enter image description here

If i try to go to http://localhost:53769/WebPricingService.svc?wsdl it runs for a several minutes and fails eventually.

I couldn't care less about this but it fails when I try to generate the client with svcutil.exe with following messages enter image description here

I have mex added to configuration

<service behaviorConfiguration="wsServiceBehavior" name="Corp.WebServices.WebPricingService">
    <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsEndpointBinding" name="ConveyancingEndpoint" contract="Corp.Core.Interfaces.IWebPricingService"/>
  <endpoint address="mex"
              binding="mexHttpBinding"
              contract="IMetadataExchange" />
  </service>

binding

 <binding name="wsEndpointBinding" maxBufferPoolSize="2147483647"
      maxReceivedMessageSize="2147483647">
      <readerQuotas maxDepth="32" maxStringContentLength="2147483647"
        maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="Transport">
        <transport clientCredentialType="Windows" />
      </security>
    </binding>

Why is it running wsdl on different port and protocol? Is there an easy workaround to generate client?


Solution

  • Solved myself.

    Part where I ask why does it run of different port is simply put - me being stupid. http and https cannot run on same port simultaneously.

    To generate client go to http://localhost:53769/WebPricingService.svc?singleWsdl then in your browser File -> Save As... and save it in C:/ as someName.wsdl then open VS tools and run svcutil.exe c:\someName.wsdl this should get you the client named someName.cs in some directory for me it's C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64.