WCF采用Message安全模式运行出错:安全包中没有可用的凭证解决方案
作者:作者不详  发布日期:2021/08/16 16:45:53
  WCF采用Message安全模式运行出错:安全包中没有可用的凭证解决方案

基于IIS承载的WCF服务,采用Message安全模式运行出错:安全包中没有可用的凭证

贴图图片-安全包中没有可用的凭证


解决方案:


打开web.config文件:negotiateServiceCredential="true", 运行正常:


XML Code:

<message 
clientCredentialType="Windows" 
establishSecurityContext="false" 
negotiateServiceCredential="true"
/>




贴图图片-安全包中没有可用的凭证1




参考配置:


XML Code:

<!--wsHttpBindings配置-->
<wsHttpBinding>
<binding name="WSHttpBindings" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"/>
<message clientCredentialType="Windows" establishSecurityContext="false" negotiateServiceCredential="false"/>
</security>
</binding>
</wsHttpBinding>

//来源:C/S框架网 | www.csframework.com | QQ:23404761




C/S框架网|原创精神.创造价值.打造精品


扫一扫加作者微信
C/S框架网作者微信 C/S框架网|原创作品.质量保障.竭诚为您服务
上一篇 下一篇