簡體   English   中英

如何驗證到報表服務器Web服務?

[英]How to authenticate into a Report Server Web Service?

我在本地安裝了SSRS 2017。 我試圖在VS2015中使用自動生成的SOAP客戶端調用Web Service(可以過時,但是我別無選擇):

var cl = new ReportingService2010SoapClient();
cl.ClientCredentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
CatalogItem[] catalogItems;
var res = cl.ListChildren(new TrustedUserHeader {}, "/", false, out catalogItems);

結果是以下異常:

發生System.ServiceModel.Security.MessageSecurityException
HResult = -2146233087消息= HTTP請求未經客戶端身份驗證方案“匿名”授權。 從服務器收到的身份驗證標頭是“ NTLM”。 來源= mscorlib

我了解我的身份驗證嘗試尚未完成,但是我正在閱讀文檔和示例一段時間,但沒有結果。

相關文檔:

更新 :另外,我想避免弄亂用戶名/密碼,並想重新使用Windows機制。

您是第一次配置WCF客戶端嗎? 使用Microsoft服務配置編輯器(在VS:工具> WCF服務配置編輯器中)!

使用工具很容易:

<basicHttpBinding>
    <binding name="ReportingService2010Soap">
        <security mode="TransportWithMessageCredential">
            <transport clientCredentialType="Ntlm" />
        </security>
    </binding>
</basicHttpBinding>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM