找不到匹配方案HTTPS与绑定的WebHttpBinding端点的基址。注册的基址方案是[HTTP] [英] Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http]

查看:660
本文介绍了找不到匹配方案HTTPS与绑定的WebHttpBinding端点的基址。注册的基址方案是[HTTP]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经历过几个网站,建议解决这个问题,但我仍然无法摆脱它。

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

我的WebConfig:

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>  


http://localhost:6188/Authenticate/Login?username=user&password=pass&ip=127.0.0.1  

希望有人可以帮助。提前致谢!。

Hope someone could help. Thanks in advance!.

修改

我必须做出与结果$ B这项工作$ b 的https://本地主机:6188 /身份验证/登录用户名=用户放大器;密码=传递和放大器; IP = 127.0.0.1

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

推荐答案

设置
< ; serviceMetadata httpsGetEnabled =FALSE/> 为false。你告诉WCF使用https的元数据终结点,我看到傻冒暴露于HTTP服务,然后你在标题中的错误。

Set <serviceMetadata httpsGetEnabled="false"/> to 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.

您还可以设置<安全模式=无/> 如果你想为你的URL建议使用HTTP。

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

这篇关于找不到匹配方案HTTPS与绑定的WebHttpBinding端点的基址。注册的基址方案是[HTTP]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆