I have created a WCF service using C# in Visual Studio 2013, and hosted it on an IIS server. I am having trouble consuming the service in a new WPF client because endpoints are missing after I add the service reference.
I can access the service using the URL, which gives me the instructional page stating that I'll need to create a client in order to test the service. The URL works on both the server and my laptop. The WSDL does exist, and I'm able to view the XML structure. Visual Studio lets me add the Service Reference using the WSDL URL, and proxy client code is generated properly.
Adding the service reference does not add any endpoints to my client's App.Config file. Ctrl-F in the WSDL shows that there isn't any endpoint data in the WSDL. The WSDL for another service hosted by a different department does include their endpoints, so I know that they should be listed this way.
Is there something that I can do to make the WSDL add endpoint configurations to the client automatically? I don't want to have to remember the endpoint for each new client, or to require others who use the service to ask me for it each time.
Per this MSDN article I've tried adding a section and repeating the endpoint in the section, rebuilt my service, restarted the host website on the IIS server, and updated my service reference, but the endpoint still hasn't been added.
When I use the Discover option in the Add Service Reference dialog box it does find the service project, but gives an error saying that the URL is incorrect. Another test solution with just the boilerplate service information works fine for a client project in that solution, and adds the endpoint to the client config. It doesn't have anything in it's Web.Config that the service I'm having trouble with doesn't have.
Possible repeat of this question, but it went unanswered.
Here's the relevant part of Web.Config from my host website (the App.Config of the service is identical):
<system.serviceModel>
<client>
<endpoint binding="webHttpBinding"
contract="TestLib.Service.ITestLibService" />
</client>
<services>
<service name="TestLib.Service.TestLibManager">
<endpoint binding="webHttpBinding" contract="TestLib.Service.ITestLibService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<webHttpBinding>
<binding>
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="Windows"/>
</security>
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
Any help is appreciated, thanks!