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

前端 未结 5 1004
礼貌的吻别
礼貌的吻别 2020-12-24 02:16

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

My WebConfig:



        
相关标签:
5条回答
  • 2020-12-24 02:32

    To make it work you have to replace a run this line of code serviceMetadata httpGetEnabled="true"/> http instead of https and security mode="None" />

    0 讨论(0)
  • 2020-12-24 02:33

    You would need to enable https binding on server side. IISExpress in this case. Select Properties on website project in solution explorer (not double click). In the properties pane then you need to enable SSL.

    0 讨论(0)
  • 2020-12-24 02:43

    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.

    0 讨论(0)
  • 2020-12-24 02:43

    I solved the issue by adding https binding in my IIS websites and adding 443 SSL port and selecting a self signed certificate in binding.

    0 讨论(0)
  • 2020-12-24 02:45

    In the endpoint tag you need to include the property address=""

    <endpoint address="" binding="webHttpBinding" bindingConfiguration="SecureBasicRest" behaviorConfiguration="svcEndpoint" name="webHttp" contract="SvcContract.Authenticate" />

    0 讨论(0)
提交回复
热议问题