2010-03-12 72 views
0

無論我如何配置Credentials屬性,當我嘗試渲染報告時,都會收到401異常。這是我的(最新)代碼:SQL Server Reporting Services 2008:如何正確設置憑證屬性?

var rs = new ReportExecutionService(); 
     rs.Url = "https://myserver/reportserver/reportexecution2005.asmx"; 

     var myCache = new System.Net.CredentialCache(); 
     myCache.Add(new Uri(rs.Url), "kerberos" , new System.Net.NetworkCredential("username", "password", "Domain")); 

     rs.Credentials = myCache; 

URL和憑證都是正確的。但當我cal rs.Render(...)時仍然會獲得401。 Reporting Services安裝位於Windows Server 2008框中,需要集成身份驗證。

感謝

+0

此外,在reportserver.config我使用 wgpubs 2010-03-13 00:29:00

回答

0

答: 修改我的RSReportServer.config文件,從而只允許基本身份驗證。我同時允許BASIC和KERBEROS,直到我註釋掉所有其他允許的類型,但是基本上這些事情開始發揮作用。

<AuthenticationTypes> 
      <RSWindowsBasic/> 
     </AuthenticationTypes> 

不知道爲什麼這是(至少不是完全)。但是MSDN上這些聯繫是有益的:

http://msdn.microsoft.com/en-us/library/cc281309.aspx

http://msdn.microsoft.com/en-us/library/cc281253.aspx

相關問題