Windows Azure RDP上的基本身份验证问题

时间:2011-09-16 08:10:37

标签: azure basic-authentication

我在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访问它时它将要求提供凭据,同样地我禁用了所有身份验证方法,除了基本仍然我无法运行此服务可能是什么问题?有人可以提出解决方案吗?

1 个答案:

答案 0 :(得分:0)

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

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

我还会设置includeExceptionDetailInFaults="true",以便在不起作用的情况下更好地查看问题。