Angular ngx-ssrs-reportviewer Credential Problems

后端 未结 1 1748
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-28 12:29

I am having SSRS report server credentials. I want the users to auto login (impersonate) whenever they go to the reports page using the credentials that I have hard coded. I am

相关标签:
1条回答
  • 2021-01-28 12:51

    This is because of Windows Authentication used by SSRS (Report Server). Like it says in the Limitations section in the documentation of ngx-ssrs-reportviewer this is not something you can fix in angular UI.

    https://www.npmjs.com/package/ngx-ssrs-reportviewer

    There are many workarounds posted in StackOverflow and other websites; however, the easiest thing I found is to create a plain .NET WebForms site using the Report Viewer control from Microsoft.

    https://docs.microsoft.com/en-us/sql/reporting-services/application-integration/integrating-reporting-services-using-reportviewer-controls-get-started?view=sql-server-ver15

    Then you simply open this website/url from angular like you do any external website, passing all required report inputs, reportServer, reportPath, and the security token. On the.NET side you have to validate the token and then use a hardcoded/service user (you can get from web.config to make it configurable). Or you can somehow get the user from the token but that is a whole other topic.

    There are a lot of details on the .NET webforms Report Viewer I am obviously skipping, but the point is do all the work on regular .NET page and then from angular is easy because you just build a url and do either:

    window.open

    or

    window.location.href

    0 讨论(0)
提交回复
热议问题