【问题标题】:Problem with Basic Authentication on Windows Azure RDPWindows Azure RDP 上的基本身份验证问题
【发布时间】:2011-09-16 08:10:37
【问题描述】:

我在 Azure 平台上托管了一个 WCF 服务,并在 web.config 中启用了基本身份验证,如下所示

<system.serviceModel>
<services>
  <service behaviorConfiguration="SimpleServiceBehavior" name="RestService.RestServiceImpl">
    <endpoint address="http://localhost/RestWCFDemo/RestServiceImpl.svc" binding="webHttpBinding" bindingConfiguration="secureBasic" contract="RestService.IRestServiceImpl" behaviorConfiguration="HttpEnableBehavior" />
  </service>
</services>
<bindings>
  <webHttpBinding>
    <binding name="secureBasic">
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Basic"></transport>

      </security>
    </binding>
  </webHttpBinding>
</bindings>
<behaviors>
  <endpointBehaviors>
    <behavior name="HttpEnableBehavior">
      <webHttp />
    </behavior>
  </endpointBehaviors>
  <serviceBehaviors>
    <behavior name="SimpleServiceBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
    <behavior name="">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />

在 Azure 上它没有运行。在本地,我在 IIS 上托管了此服务并启用了基本身份验证,然后它会在我从 URL 访问它时询问凭据,同样我禁用了除基本之外的所有身份验证方法我仍然无法运行此服务可能是什么问题?任何人都可以提出解决方案吗?

【问题讨论】:

    标签: azure basic-authentication


    【解决方案1】:

    您可以尝试将 proxyCredentialType 添加到您的传输中:

    <transport clientCredentialType="Basic" proxyCredentialType="Basic"/>
    

    我还会设置includeExceptionDetailInFaults="true",这样如果这不起作用,您可以更好地看到问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-22
      • 2018-12-20
      • 2021-05-17
      • 2010-11-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多