Been pulling hair out for a week now trying to get a existing, working web service to work unber https. The web service advertises fine while under https but when trying to interact thru client it fails. I have read everything and tried so many combinations of app.config and web configs and need more eyes. Here is what I have.
App.Config
<?xml version="1.0" encoding="utf-8"?>
Web.Config
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<protocolMapping>
<add scheme="http" binding="basicHttpBinding" bindingConfiguration="" />
<add scheme="https" binding="basicHttpsBinding" bindingConfiguration="BasicHttpBinding_IScanDocumentWcf" />
</protocolMapping>
<diagnostics>
<messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000000" maxSizeOfMessageToLog="2000000" />
</diagnostics>
<bindings>
<basicHttpsBinding>
<binding name="BasicHttpBinding_IScanDocumentWcf" maxReceivedMessageSize="2000000000" closeTimeout="01:00:00" openTimeout="01:00:00" receiveTimeout="01:00:00" sendTimeout="01:00:00">
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Certificate" algorithmSuite="Default" />
</security>
</binding>
</basicHttpsBinding>
</bindings>
<services>
<service name="MySiteLibrary.Services.ScanDocumentWcf" behaviorConfiguration="serviceHttpsBehavior">
<endpoint address="" binding="basicHttpsBinding" contract="MySiteLibrary.Services.IScanDocumentWcf" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="serviceFaultBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
<behavior name="serviceHttpsBehavior">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
Error Returned
There was no endpoint listening at https://webscan.MySite.com/ScanDocumentWcf.svc that could accept the
message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Server stack trace: at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream() at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at IScanDocumentWcf.GetScanForms() at ScanDocumentWcfClient.GetScanForms()
Inner Exception: Unable to connect to the remote server at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
Inner Exception: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 195.168.2.145:443 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)