Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http]

I've been through several web site that suggest solution to this problem, but still I can't get rid of it.

My WebConfig:

<bindings>   <webHttpBinding>     <binding name="SecureBasicRest">       <security mode="Transport" />     </binding>   </webHttpBinding> </bindings> <behaviors>   <serviceBehaviors>     <behavior name="svcBehavior">       <serviceMetadata httpsGetEnabled="true"/>       <serviceDebug includeExceptionDetailInFaults="false"/>     </behavior>   </serviceBehaviors>   <endpointBehaviors>     <behavior name="svcEndpoint">       <webHttp helpEnabled="true"/>       <enableWebScript/>     </behavior>   </endpointBehaviors> </behaviors> <services>   <service name="SvcContract.Authenticate" behaviorConfiguration="svcBehavior">     <endpoint binding="webHttpBinding" bindingConfiguration="SecureBasicRest"               behaviorConfiguration="svcEndpoint" name="webHttp"               contract="SvcContract.Authenticate" />   </service> </services>   

Hope someone could help. Thanks in advance!.

Edit

I have to make this work with
https://localhost:6188/Authenticate/Login?username=user&password=pass&ip=127.0.0.1

like image 505
fiberOptics Avatar asked Mar 22 '12 06:03

fiberOptics


1 Answers

Change

<serviceMetadata httpsGetEnabled="true"/> 

to

<serviceMetadata httpsGetEnabled="false"/> 

You're telling WCF to use https for the metadata endpoint and I see that your'e exposing your service on http, and then you get the error in the title.

You also have to set <security mode="None" /> if you want to use HTTP as your URL suggests.

like image 103
Per Kastman Avatar answered Sep 30 '22 21:09

Per Kastman