Could not find base address matching https for endpoint with BasicHttpBinding binding

I am trying to create a WCF service with only transport security, so I do not need SSL.

I keep getting this error message on startup:

Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. 

My Web.config file looks like this:

 <?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="Binding1"> <security mode="Transport"> <transport clientCredentialType="Basic"></transport> </security> </binding> </basicHttpBinding> </bindings> <services> <service behaviorConfiguration="ServiceBehavior" name="AutoSenderWCFService.AutoSenderService"> <endpoint binding="basicHttpBinding" bindingConfiguration="Binding1" contract="AutoSenderWCFService.IService1" /> </service> </services> <behaviors> <serviceBehaviors> <behavior name="ServiceBehavior"> <serviceCredentials> <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="AutoSenderWCFService.MyValidator, AutoSenderWCFService"/> </serviceCredentials> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration> 
+4
source share
3 answers

Transport security means securing your channel with SSL and therefore you need a certificate.

If you do not want to use SSL, but want to pass the user password through the channel, you can use ClearUsernameBinding which sends the user password through the channel in clear text.

NOTE. Make sure that you only use this if you are sure that the client and server channels are protected, as behind a firewall that provides security.

+6
source

I don't see any address there - add the address to the endpoint and should be ok

So:

 <endpoint binding="basicHttpBinding" address="https://address" bindingConfiguration="Binding1" contract="AutoSenderWCFService.IService1" /> 
+1
source

In my case, I tried to check the wcf web service setting on a test server without ssl. I changed the security mode to no and it started working for me.

+1
source

Source: https://habr.com/ru/post/1412916/


All Articles