【发布时间】: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