我去过几个关于如何纠正这个错误的网站,但无法摆脱这个错误。我将它托管在启用 SSL 的 IIS 6 上。下面是我的配置
<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>
希望有人能帮忙!