c# - Wcf service not running when changed to https -
i changed bindings in web.config https , tried url in browser https://localhost:5060/scanner/ not returning anything. if change bindings http working properly.
i used webhttp binding wcf service. please suggest how this.
<system.servicemodel> <bindings> <webhttpbinding> <binding name="webhttptransportsecurity"> <security mode="transport" /> </binding> </webhttpbinding> </bindings> <extensions> <behaviorextensions> <add name="accesscontrolendpointbehavior" type="wiaconsoleapp.behaviors.accesscontrolendpointbehavior, wiaconsoleapp" /> </behaviorextensions> </extensions> <behaviors> <servicebehaviors> <behavior name="wiaservice.wiascannerbehavior"> <servicemetadata httpsgetenabled="true" httpgetenabled="false" /> <servicedebug includeexceptiondetailinfaults="false"/> </behavior> </servicebehaviors> <endpointbehaviors> <behavior name="ajaxendpoitbehavior"> <webhttp defaultoutgoingresponseformat="json" /> <accesscontrolendpointbehavior /> </behavior> </endpointbehaviors> </behaviors> <services> <service name="wiaservice.wiascanner" behaviorconfiguration="wiaservice.wiascannerbehavior"> <!-- service endpoints --> <endpoint address="scanner" binding="webhttpbinding" bindingconfiguration="webhttptransportsecurity" behaviorconfiguration="ajaxendpoitbehavior" contract="wiaservice.iwiascanner"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexhttpsbinding" contract="imetadataexchange"/> <host> <baseaddresses> <add baseaddress="https://localhost:5060/" /> </baseaddresses> </host> </service> </services> <servicehostingenvironment multiplesitebindingsenabled="true"/> </system.servicemodel>
Comments
Post a Comment