Many times I found that the Reporting service is configured to access as "Anonymous Access", so any user having URL can access reports from external world. Ideally it should be access by only users/application. For that SQL SERVER Reporting service should not be accessed by "Anonymous Access". It also prevents Report server from unauthorized access. NOTE: In shared hosting, Hosting provider provides username/password and only those users can get access to the reports for that specific user. Today, I am going to explain to how to send user credentials from Report application, so Reporting service can authenticate user and allow to get reports. Only users having correct credentials can access the reports from the server. We are going to configure application to send credentials, so application can get access to the reports. To configure application to get access reports from Shared hosting/Domain, we need to do following: 1. Get credentials from shared hosting/Domain controller to access the reports 2. Configure Application to Authenticate (.Net) 1. Get credentials: Whenever we need to deploy/access report from the Report Server, we should have following information:
This information will be provided by Shared hosting provider/Domain controller. Information like:
To check this information, Type Report URL in browser. It will ask for Username and password (if anonymous access is disabled). Enter given credentials, if Credentials are correct then Reporting service allow you to access the URL. 2. Configure Application to Authenticate (.Net) As we get Basic information in step #1, now we need to build application that pass credentials to the Report server, so Report server authenticate the request and allow application to access the reports. To authenticate request to Report server we need to implement IReportServerCredentials to send Report Credential to Report Server.
Public Class ReportCredentials
Imports Microsoft.Reporting.WebForms That's it, now you can access your reports deployed at Shared Hosting/Domain from application, Report server allows to access if credentials are correct. Let me know if you have any question/problem in deploying/accessing reports from Shared Hosting/Domain. |
Learn SQL and database management at SQLYoga for articles, tutorials, and tips to improve your skills and streamline data operations. Join our community!
April 25, 2011
SSRS: Configure User Authentication with ReportCredentials
April 19, 2011
SSRS: Introduction to SQL SERVER Reporting Services
Report is a better presentation of data. From report user/Management can easily analyze the information. Report is easy to explain such information like Sales graph, profitability etc.. SQL SERVER provides rich kind of report that can be easily generated from SQL SERVER and send it to user/management in different formats like Excel, word, HTML etc..SSRS (SQL SERVER Reporting Services) also supports CHARTS which is very useful when we need to develop reports for Management. To start with report, We can see how to create a report with SSRS. We will learn this by following steps: 1. Create Report. 1. Create a Report
2. Deploy Report to Report Server:
To deploy report on Report server, we need to have Report server information like Report Server URL, Credentials to connect to Report Server. Today we will just deploy report to Local Report server, I will explain in another post to How to deploy report to the server which requires credentials. 3. Use Report from application (Asp.Net)
This is simple code, which tells Report Viewer control to load report. Let me explain each line. 1. ReportServerUrl and ReportDataSourceName are set up with server information. 2. Then we need to setup "ReportName", it tells report viewer control to load that report from Report server. .ReportPath = ReportDataSourceName + "ReportName" NOTE: "ReportName", will be actual report name 3. And we also need to setup Report Credentials, so "Report server" can allow our application to access this report. That's it. Now run application and you can find that you can access "Reports" in application. |