标签:c sql-server wcf credentials reporting-services
我正在通过WCF接入SSRS 2008的ReportingService2005服务.
我有它与冒充一起工作,像这样:
ReportingService2005SoapClient rService =
new ReportingService2005SoapClient("endpoint config name", "the url");
rService.ClientCredentials.Windows.AllowedImpersonationLevel =
System.Security.Principal.TokenImpersonationLevel.Impersonation;
rService.ChannelFactory.Credentials.Windows.ClientCredential =
CredentialCache.DefaultNetworkCredentials;
但是当我尝试将特定的用户名/密码传递给它时,就像这样:
rService.ChannelFactory.Credentials.Windows.ClientCredential =
new NetworkCredential(username, password, domain);
我在第一个方法调用时遇到此错误:
The HTTP request is unauthorized with client authentication scheme
‘Ntlm’. The authentication header received from the server was ‘NTLM’.
这是我的wcf绑定配置的相关部分:
<basicHttpBinding>
<binding name="ReportingService2005Soap" ... blah blah blah ...
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" proxyCredentialType="Ntlm" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
我对两种不同情况下提到Ntlm的错误消息感到困惑.
所以问题是 – 为了让它发挥作用,我需要摆弄两个不同的WCF设置中的哪一个?
标签:c,sql-server,wcf,credentials,reporting-services 来源: https://codeday.me/bug/20190621/1253227.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。