wcf - Both http and https for one service -


i'm tackling issue couldn't sort out it.

i have 1 service worked inside asp.net 4.0 app. site available both on http , https. issue service below provided config snipped can work either on http or on https.

what wrong in config?

<system.servicemodel>         <bindings>             <webhttpbinding>                 <binding name="webhttpsbinding">                     <security mode="transport">                         <transport clientcredentialtype="none"/>                     </security>                 </binding>             </webhttpbinding>         </bindings>         <behaviors>             <endpointbehaviors>                 <behavior name="hms.dataservices.paymentsservicebehavior">                     <enablewebscript />                 </behavior>             </endpointbehaviors>             <servicebehaviors>                 <behavior name="hms.dataservices.paymentsservicebehavior">                     <servicemetadata httpgetenabled="true" />                     <servicedebug includeexceptiondetailinfaults="false" />                 </behavior>             </servicebehaviors>         </behaviors>         <services>             <service name="hms.dataservices.paymentsservice">                  <!--http-->                 <endpoint address="" binding="webhttpbinding" contract="hms.dataservices.ipaymentsservice"                            behaviorconfiguration="hms.dataservices.paymentsservicebehavior" />                  <!--https-->                 <endpoint address="" binding="webhttpbinding" bindingconfiguration="webhttpsbinding"                            contract="hms.dataservices.ipaymentsservice"  behaviorconfiguration="hms.dataservices.paymentsservicebehavior" />             </service>         </services>         <servicehostingenvironment aspnetcompatibilityenabled="true" multiplesitebindingsenabled="true" />     </system.servicemodel> 

this config works on https not nttp

in windows log see next error

 exception message is: not find base address matches scheme https endpoint binding webhttpbinding. registered base address schemes [http]..  

thanks in advance!


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -