【发布时间】:2019-10-31 02:13:15
【问题描述】:
主机上配置的认证方案 ('IntegratedWindowsAuthentication') 不允许那些在 绑定“BasicHttpBinding”(“匿名”)。请确保 SecurityMode 设置为 Transport 或 TransportCredentialOnly。 此外,这可以通过更改身份验证来解决 此应用程序的方案通过 IIS 管理工具,通过 ServiceHost.Authentication.AuthenticationSchemes 属性,在 应用程序配置文件在 元素,通过更新绑定上的 ClientCredentialType 属性, 或通过调整 AuthenticationScheme 属性 HttpTransportBindingElement。
我们有一个托管在 IIS 7.5 上的 WCF Rest 服务 如果启用匿名身份验证(在 IIS 中),我们就可以浏览服务。
但是如果禁用 IIS 上的匿名身份验证,则会出现上述错误消息。
我们正在使用 webHttpBinding 并使用以下定义进行绑定
<binding name="ExternalServicesRestBinding" closeTimeout="10:01:00" openTimeout="10:01:00" receiveTimeout="10:10:00" sendTimeout="10:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
</security>
</binding>
端点行为为
<behavior name="endpointBehaviourForRestService">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<webHttp />
</behavior>
请提供任何建议或线索,您认为可以解决问题吗?
提前致谢。
拉库马尔。
【问题讨论】: