SSRS 2008 R2 升级 - Web 服务访问问题 - 401 未经授权

发布于 2024-09-02 02:28:23 字数 1378 浏览 2 评论 0原文

我们已从 SSRS 2008 实例升级到 SSRS 2008 R2。这是就地升级,因此报告和数据源已转移到新实例。

从应用程序端(asp.net),我们使用SSRS Web服务(ReportService2005.asmx)进行ListChildren、GetPolicies等调用来处理一些应用程序特定场景。

但是,升级到 R2 后,对 ListChildren 的 Web 服务调用失败,并显示“401,未经授权”消息。

ReportingService2005 reportService = new ReportingService2005();

                reportService.Url = ConfigurationManager.AppSettings["ReportServerWebserviceUrl"];

                reportService.Credentials = new NetworkCredential(
                       ConfigurationManager.AppSettings["ReportViewerUser"],
                    ConfigurationManager.AppSettings["ReportViewerPassword"],
                    ConfigurationManager.AppSettings["ReportViewerDomain"]);
                reportService.PreAuthenticate = true;                

                SSRSReportServer.CatalogItem[] _reportItems = new SSRSReportServer.CatalogItem[] { };

_reportItems = reportService.ListChildren(ConfigurationManager.AppSettings["RootFolder"], true);

asp.net应用程序中的代码如上。上面的 NetworkCredential 中使用的帐户处于活动状态,我已检查以确保该帐户没有被锁定。

该帐户在代码尝试访问的 SSRS 文件夹上设置为内容管理器。

当我浏览到 http://server/reportserver/reportservice2005.asmx - 我能够看到用于网络服务的 wdsl。

总的来说,当指向 Sql2008 SSRS 实例时,这是工作代码 - 并且 401 错误显示在 Sql2008 R2 实例上。

有什么想法吗?

we have upgraded to SSRS 2008 R2 from a SSRS 2008 instance. This was an upgrade in-place and so the reports and datasources were brought over to the new instance.

from the application side (asp.net), we use the SSRS Webservice (ReportService2005.asmx) to makes calls such as ListChildren, GetPolicies to handle some application specific scenarios.

however, after the upgrade to R2, the web service call to ListChildren fails with a "401, unathorized" message.

ReportingService2005 reportService = new ReportingService2005();

                reportService.Url = ConfigurationManager.AppSettings["ReportServerWebserviceUrl"];

                reportService.Credentials = new NetworkCredential(
                       ConfigurationManager.AppSettings["ReportViewerUser"],
                    ConfigurationManager.AppSettings["ReportViewerPassword"],
                    ConfigurationManager.AppSettings["ReportViewerDomain"]);
                reportService.PreAuthenticate = true;                

                SSRSReportServer.CatalogItem[] _reportItems = new SSRSReportServer.CatalogItem[] { };

_reportItems = reportService.ListChildren(ConfigurationManager.AppSettings["RootFolder"], true);

the code in the asp.net app is as above. the account being used in the NetworkCredential above is active and i have checked to make sure that the account is not locked out.

the account is setup as Content Manager on the SSRS folder that the code is trying to access.

when i browse to http://server/reportserver/reportservice2005.asmx - i am able to see the wdsl for the webservice.

overall, this is working code, when pointed to a Sql2008 SSRS instance - and the 401 error shows up on the Sql2008 R2 instance.

any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

渔村楼浪 2024-09-09 02:28:23

您的 Web 服务器是否设置为对 SQL2008 实例使用委派,而不是对 R2 实例使用委派?由于您在 Web 服务器上设置了凭据,这可能不是问题,但这是一个相当常见的问题。

Is your web server set up to use delegation for your SQL2008 instance but not your R2 instance? Since you set the credentials on the web server this may not be an issue, but it is a fairly common problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文