开发者

SSRS: Enumerate available reports - only works with UseDefaultCredetials

开发者 https://www.devze.com 2023-01-20 23:32 出处:网络
I\'m trying to generate a list of available reports from an SSRS 2008 installation, using code as below:

I'm trying to generate a list of available reports from an SSRS 2008 installation, using code as below:

ReportingService2005 rs = new ReportingService2005();
rs.UseDefaultCredentials = true;

CatalogItem[] items = rs.ListChildren("/", true);

foreach(CatalogItem ci in i开发者_Go百科tems)
{
   if (ddlReport.Type == ItemTypeEnum.Report)
      ddlReport.Items.Add(ci.Path);
}

This works fine.

If I set UseDefaultCredentials to false and specify rs.Credentials as System.Net.CredentialCache.DefaultCredentials this also works fine.

However, if I set UseDefaultCredentials to false and specify specific credentials I get 401 unauthorized errors back.

The credentials I am trying to use definitely have access to the report server, and I am at a loss to proceed further.

0

精彩评论

暂无评论...
验证码 换一张
取 消