c# - 400 Bad Request to access WCF API over HTTPS -
c# - 400 Bad Request to access WCF API over HTTPS -
can please point me out what's wrong service configuration in web.config
. want access on https
.
<system.servicemodel> <bindings> <wshttpbinding> <binding name="transportsecurity"> <security mode="transport"> <transport clientcredentialtype="none"/> </security> </binding> </wshttpbinding> </bindings> <services> <service name="wcfservice1.service1" behaviorconfiguration="wcfservice1.service1behavior"> <endpoint binding="wshttpbinding" bindingconfiguration="transportsecurity" contract="wcfservice1.iservice1"/> <endpoint address="mex" binding="mexhttpsbinding" contract="imetadataexchange"/> </service> </services> <behaviors> <servicebehaviors> <behavior name="wcfservice1.service1behavior"> <servicemetadata httpgetenabled="false" httpsgetenabled="true" /> <servicedebug includeexceptiondetailinfaults="false"/> </behavior> </servicebehaviors> <endpointbehaviors> <behavior name="mybehavior"> <webhttp/> <enablewebscript/> </behavior> </endpointbehaviors> </behaviors> <servicehostingenvironment aspnetcompatibilityenabled="false"> </servicehostingenvironment> </system.servicemodel>
i have enabled ssl
using test certificates on iis7
. service1.svc
accessible without error , getting 200 ok response
when accessed through .net
console client application. getting 400 bad request
while accessing api
defined in service. same api working fine when used http configuration.
c# wcf ssl
Comments
Post a Comment