无法找到端点与结合WsHttpBinding的匹配计划http的基址 [英] Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding

查看:326
本文介绍了无法找到端点与结合WsHttpBinding的匹配计划http的基址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我迪达WCF的用户名/密码验证我的本地计算机上,自签名证书,一切工作正常,但是当我把我的应用程序在IIS 7.5和Windows Server 2008 R2,它gaves我的错误:

找不到与绑定的WSHttpBinding端点符合计划http的基址。已注册的基址方案是[HTTPS]。 我的Web服务CFG:

 < XML版本=1.0编码=UTF-8&GT?;
<结构>
< system.serviceModel>
<行为>
  < serviceBehaviors>
    <行为NAME =ServiceCredentialsBehavior>
      < serviceCredentials>
        < serviceCertificate findValue =CN = AmicCertSTORENAME =根的StoreLocation =LOCALMACHINE/>
        < userNameAuthentication userNamePasswordValidationMode =自定义customUserNamePasswordValidatorType =Util.CustomUserNameValidator,的Util/>
      < / serviceCredentials>
      < serviceMetadata httpGetEnabled =真/>
    < /行为>
  < / serviceBehaviors>
< /行为>
<服务>
  <服务behaviorConfiguration =ServiceCredentialsBehaviorNAME =服务>
    <端点地址=绑定=的wsHttpBindingbindingConfiguration =MessageAndUserNameNAME =SecuredByTransportEndpoint合同=IService/>
  < /服务>
< /服务>
<绑定>
  <的wsHttpBinding>
    <绑定名称=MessageAndUserName>
      <安全模式=消息>
        <消息clientCredentialType =用户名/>
      < /安全>
    < /装订>
  < /的wsHttpBinding>
< /绑定>
      <客户端/>
   < /system.serviceModel>
  <的System.Web>
<编译调试=真/>
 < /system.web>
 < /结构>
 

解决方案

这听起来像你主持下,只配置了HTTPS(SSL)的IIS网站实例。右键单击网站实例,然后选择编辑绑定...。你看到80端口(纯HTTP)列在那里?同时检查SSL设置功能,以确保始终需要选项没有打开。

I dida wcf username/password authentication on my local computer, with self signed certificate, all works fine, but when i put my application on IIS 7.5, and windows server 2008 R2, it gaves me the error:

Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [https]. My web service 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>

解决方案

It sounds like the IIS web site instance you're hosting under is only configured for HTTPS (SSL). Right click the web site instance and choose "Edit Bindings...". Do you see port 80 (plain HTTP) listed there? Also check the "SSL Settings" feature to make sure the "Always require" option is not turned on.

这篇关于无法找到端点与结合WsHttpBinding的匹配计划http的基址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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