1

当我想使用 wcfstorm 客户端在我的服务上执行方法时出现此错误。

我尝试了很多不同的设置,但我无法让它工作。如果我切换到传输安全性,我会收到另一个错误。它与 wsHttpBinding 完美配合,但由于 PHP 兼容性,客户需要 basicHttpBinding。我需要一个自定义用户身份验证类来针对我的 sql 数据库对用户进行身份验证。

网络配置

  <services>
  <service name="e3kConnector.E3KConnectorService" behaviorConfiguration="basicHttpBehavior">
    <endpoint address="" binding="basicHttpBinding"
      bindingConfiguration="basicHttpBinding" name="basicHttpEndpoint"
      contract="e3kConnector.e3kConnectorService" />
  </service>
</services>
<bindings>
  <basicHttpBinding>
    <binding name="basicHttpBinding">
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Basic"/>
      </security>
    </binding>
  </basicHttpBinding>
</bindings>
<client />
<behaviors>
  <serviceBehaviors>
    <behavior name="basicHttpBehavior">
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
      <serviceCredentials>
        <userNameAuthentication userNamePasswordValidationMode="Custom"
          customUserNamePasswordValidatorType="e3kConnector.App_Data.Security.CustomUserNameValidator,e3kConnector" />
      </serviceCredentials>
      <serviceAuthorization principalPermissionMode="Custom">
        <authorizationPolicies>
          <add policyType="e3kConnector.App_Data.Security.AuthorizationPolicy, e3kConnector" />
        </authorizationPolicies>
      </serviceAuthorization>
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />

4

0 回答 0