[英]Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [https]
I've been to several sites on how to correct this error and can't get rid of the error. 我去过几个站点,了解如何更正此错误,无法摆脱该错误。 I'm hosting it on IIS 6 with SSL enabled.
我在启用SSL的IIS 6上托管它。 Below is my configuration
下面是我的配置
<services>
<service behaviorConfiguration="UsernamePasswordBehavior" name="DataServices.BEService">
<endpoint address="mex" binding="mexHttpsBinding" name="mex" contract="IMetadataExchange" listenUri="https://mysite/beservice.svc"/>
<endpoint address="wsbe" binding="wsHttpBinding" bindingConfiguration="wsHttpWithUsernamePassword"
name="BEwsHttp" contract="DataServices.IBEService" listenUri="https://mysite/beservice.svc" />
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="wsHttpWithUsernamePassword" sendTimeout="00:06:00" receiveTimeout="00:06:00">
<security mode="Message">
<message clientCredentialType="UserName"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="UsernamePasswordBehavior">
<serviceMetadata httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="DataServices.CustomUsernameValidator, DataServices" />
<serviceCertificate findValue="*.mysite.com" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
Hope someone can help! 希望有人能帮忙!
It sounds like the IIS web site instance you're hosting under is only configured for HTTPS (SSL). 听起来好像您托管的IIS网站实例仅配置了HTTPS(SSL)。 Right click the web site instance and choose "Edit Bindings...".
右键单击该网站实例,然后选择“编辑绑定...”。 Do you see port 80 (plain HTTP) listed there?
您是否在其中看到端口80(普通HTTP)? Also check the "SSL Settings" feature to make sure the "Always require" option is not turned on.
还要检查“ SSL设置”功能,以确保未打开“始终需要”选项。 - Taken from Stack overflow itself.
-取自Stack溢出本身。 It can work as you are using only message security in your config,there has to be an non-HTTPS/SSL address bound to the site.
它可以正常工作,因为您仅在配置中使用消息安全性,该站点必须绑定一个非HTTPS / SSL地址。 Has your code worked when you use self signed certificate on local machine?
在本地计算机上使用自签名证书时,代码是否正常工作?
I think you need to use 我认为你需要使用
<security mode="TransportWithMessageCredential">
For your security mode, rather than Message ? 为了您的安全模式,而不是消息?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.