I am trying to create a WCF Service with only Transport Security so I do not need SSL.
I keep geting this error message when I run it:
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>
Transport security means securing your channel with SSL and hence you would need a certificate.
If you dont want to use SSL but want to pass username password over the channel then you can use ClearUsernameBinding that sends the username password over the channel in clear text.
NOTE: Make sure you use this only when you are confident that you client and server channel is secure like behind a firewall that provides security.
I cant see any address in there - add an address to your endpoint and should be ok
so:
<endpoint binding="basicHttpBinding" address="https://address" bindingConfiguration="Binding1"
contract="AutoSenderWCFService.IService1" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With