c# - Ignore Certificate Error in a Web Service? -
is there way of ignoring ssl certificate errors?
i have developed web service until has been running locally using http, has been moved externally , needs communicate via https. certificate testing purposes self-signed , therefore not trusted , getting error the provided uri scheme 'https' invalid; expected 'http'.
web.config
<system.servicemodel> <bindings> <basichttpbinding> <binding name="remotesoap" /> </basichttpbinding> </bindings> <client> <endpoint address="https://mydomainwebservice:8444/test.asmx" binding="basichttpbinding" bindingconfiguration="remotesoap" contract="remoteservice.remotesoap" name="remotesoap" /> </client> </system.servicemodel>
if add following security element following error the remote certificate invalid according validation procedure.
seems caused the underlying connection closed: not establish trust relationship ssl/tls secure channel.
<security mode="transport"> <transport clientcredentialtype="none" /> </security>
can kindly advise ignore these errors?
try editing config values in .config
<configuration> <system.net> <settings> <servicepointmanager checkcertificatename="false" checkcertificaterevocationlist="false" /> </settings> </system.net> </configuration>
Comments
Post a Comment