控制台应用程序和 SSRS 报告 Windows 身份验证

发布于 2025-01-14 21:35:51 字数 483 浏览 4 评论 0原文

我有一个控制台应用程序。 (vb.net) 调用多个 SSRS 报告。这将由在服务中使用 Windows 帐户的 SQL 代理执行。该帐户确实可以访问我们的报告服务器。当我硬编码用户名、密码、域时,该过程工作正常。
Dim cred As New ReportServerCredentials("user","pw","domain") 但在我可以转向产品之前。帐户不能被硬编码,所以我需要使用 Windows 身份验证。我尝试使用这个: serverReport.ReportServerCredentials = System.Net.CredentialCache.DefaultCredentials 但它不起作用。
这是我得到的错误。 无法将“System.Net.SystemNetworkCredential”类型的对象转换为“Microsoft.Reporting.WebForms.IReportServerCredentials”类型

如何通过 Windows 身份验证调用 SSRS 报告。仅有的?

I have a console app. (vb.net) that calls several SSRS reports. This will be executed by SQL agent that's using a windows account in the services. This account does have access to our reporting server. The process works fine when I hardcode a username, pw, domain.
Dim cred As New ReportServerCredentials("user","pw", "domain")
but before I can move to prod. Accounts can not be hardcoded, so I need to use windows auth. I tried using this: serverReport.ReportServerCredentials = System.Net.CredentialCache.DefaultCredentials
but it's not working.
this is the error I get.
Unable to cast object of type 'System.Net.SystemNetworkCredential' to type 'Microsoft.Reporting.WebForms.IReportServerCredentials'

How can I call an SSRS report via windows auth. only?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文