加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – 找不到与绑定WSHttpBinding的端点的scheme http匹配的基址

发布时间:2020-12-15 18:25:53 所属栏目:百科 来源:网络整理
导读:我在我的本地计算机上进行了用户名/密码验证,使用自签名证书,一切正常,但是当我将我的应用程序放在IIS 7.5和 Windows Server 2008 R2上时,它给了我错误: 找不到与绑定WSHttpBinding的端点的scheme http匹配的基址.注册的基地址方案是[https]. 我的网络服务c
我在我的本地计算机上进行了用户名/密码验证,使用自签名证书,一切正常,但是当我将我的应用程序放在IIS 7.5和 Windows Server 2008 R2上时,它给了我错误:
找不到与绑定WSHttpBinding的端点的scheme http匹配的基址.注册的基地址方案是[https].
我的网络服务cfg:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="ServiceCredentialsBehavior">
      <serviceCredentials>
        <serviceCertificate findValue="cn=AmicCert" storeName="Root" storeLocation="LocalMachine" />
        <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="Util.CustomUserNameValidator,Util" />
      </serviceCredentials>
      <serviceMetadata httpGetEnabled="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
  <service behaviorConfiguration="ServiceCredentialsBehavior" name="Service">
    <endpoint address="" binding="wsHttpBinding" bindingConfiguration="MessageAndUserName" name="SecuredByTransportEndpoint" contract="IService" />
  </service>
</services>
<bindings>
  <wsHttpBinding>
    <binding name="MessageAndUserName">
      <security mode="Message">
        <message clientCredentialType="UserName" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>
      <client />
   </system.serviceModel>
  <system.web>
<compilation debug="true" />
 </system.web>
 </configuration>

解决方法

听起来您托管的IIS网站实例仅配置为HTTPS(SSL).右键单击网站实例,然后选择“编辑绑定…”.你看到那里列出了端口80(普通HTTP)吗?同时检查“SSL设置”功能,确保未启用“始终需要”选项.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读