Windows Azure RDP 上的基本身份验证问题
我在 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 访问它时,它才会要求提供凭据,同样,我已禁用除基本身份验证之外的所有身份验证方法,但我仍然无法运行此服务,这可能是什么问题?有人能提出解决方案吗?
I have hosted one WCF Service on the Azure platform and in web.config enabled basic authentication as per below
<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" />
On Azure it is not running. In local I have hosted this service on IIS and Enabled basic authentication only then it will ask for credentials when I will access it from URL, same way I have disabled all authentication methods except basic still I can't run this service what could be the problem? Can anyone suggest a solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试将 proxyCredentialType 添加到您的传输中:
我还会设置
includeExceptionDetailInFaults="true"
,这样如果不起作用,您可以更好地看到问题。You can try adding a a proxyCredentialType to your transport:
I would also set
includeExceptionDetailInFaults="true"
so you can see the problem better if that doesn't work.