I have a wcf with like below url
https://localhost:44370/service.svc
I have a window service which is using the above wcf
and in my app.config I configured the same like below
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpsBinding_IService" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://localhost:44370/service.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpsBinding_IService" contract="FileServer.IService"
name="BasicHttpsBinding_IService" />
</client>
</system.serviceModel>
but I am getting the following error the provided uri scheme https is invalid; expected 'http'
when I changed my binding type into https like below
<system.serviceModel>
<bindings>
<basicHttpsBinding>
<binding name="BasicHttpsBinding_IService" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" />
</basicHttpsBinding>
</bindings>
<client>
<endpoint address="https://localhost:44370/service.svc" binding="basicHttpsBinding"
bindingConfiguration="BasicHttpsBinding_IService" contract="FileServer.IService"
name="BasicHttpsBinding_IService" />
</client>
</system.serviceModel>
then I am getting the below error
configuration binding extension 'system.servicemodel/binding.basichttpsbinding' could not be found. verify that this binding extension is properly registered in 'system.servicemodel/binding.basichttpsbinding' and that it is spelled correctly.
what can I do to solve this?
CodePudding user response:
You are trying to use a HTTPS address with a HTTP binding, change the binding type to 'basicHttpsBinding'.
CodePudding user response:
but I am getting the following error the provided uri scheme https is invalid; expected 'http'
You try adding security mode to the binding, this change will allow you to use https instead of http.
<basicHttpBinding>
<binding name="BasicHttpsBinding_IService" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="Transport">
</security>
</binding>
</basicHttpBinding>