2010-03-12 94 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

相关问题