I'm getting this error when trying to call a function of a wsdl
. I added a ServiceReference
to a project in my solution. In that project I have the following app.config
file
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="MYSERVICENAME_ws_Authorization_Binder" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport">
<transport clientCredentialType="Basic" proxyCredentialType="Basic"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="MYSERVICEURL"
binding="basicHttpBinding" bindingConfiguration="MYSERVICENAME_ws_Authorization_Binder"
contract="MYSERVICE.Authorization_PortType" name="MYSERVICENAME_ws_Authorization_Port" />
</client>
</system.serviceModel>
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging">
<listeners>
<add name="messages"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData="c:\logs\messages.svclog" />
</listeners>
</source>
</sources>
</system.diagnostics>
<system.serviceModel>
<diagnostics>
<messageLogging
logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true"
maxMessagesToLog="3000"
maxSizeOfMessageToLog="2000"/>
</diagnostics>
</system.serviceModel>
Then in my main project, the MVC
project I have the following in the Web.config
file.
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="MYSERVICENAME_ws_Authorization_Binder" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="MYSERVICEURL"
binding="basicHttpBinding" bindingConfiguration="MYSERVICENAME_ws_Authorization_Binder"
contract="MYSERVICE.Authorization_PortType" name="MYSERVICENAME_ws_Authorization_Port" />
</client>
</system.serviceModel>
The error occurs when I'm running in debug mode, localhost
. I haven't tried it on my website since I'm still developing. My website has a certified SSL
and my localhost is also configured to run on HTTPS
but only with a self-signed certificate.
Am I getting this error because my self-signed certificate isn't enough? Can I make localhost
also use the SSL
that my website is using? If not, what's the best solution to this? I have found a few posts on this error but haven't found a solution that helps me yet.