I'm having an odd issue, I have hosted a WCF service on my local machine, I have enabled SSL on it & my service web.config looks like this;
<system.serviceModel>
<services>
<service behaviorConfiguration="PostingBehavior" name="IMedTabletHL7Service.Hl7Service">
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="web" bindingConfiguration="PostingCapable" contract="IMedTabletHL7Service.IHL7Service">
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp defaultBodyStyle="Wrapped" faultExceptionEnabled="true" helpEnabled="true"></webHttp>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="PostingBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Buffered" receiveTimeout="00:30:00">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
<mexHttpsBinding>
<binding name="NewBinding0" />
</mexHttpsBinding>
<webHttpBinding>
<binding name="PostingCapable" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Buffered" receiveTimeout="00:30:00">
<security mode="Transport">
<transport proxyCredentialType="None" clientCredentialType="None"></transport>
</security>
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</webHttpBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
and my desktop app.config file looks like this;
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IHL7Service" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport">
<transport proxyCredentialType="None" clientCredentialType="None"></transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://localhost/IMedTabletHL7Service/Hl7Service.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IHL7Service"
contract="HL7Webservice.IHL7Service" name="BasicHttpBinding_IHL7Service" />
</client>
Its throwing me following error;
System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at https://localhost/IMedTabletHL7Service/Hl7Service.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
Also when I access service from browser its not giving me any error.
One problem is that your service and your client use different bindings for their endpoints (service: webHttpBinding, client: basicHttpBinding).