tags:

views:

5481

answers:

3

I am trying to integrate the SSRS report to my web page: The code is as follows: ReportViewer1.ProcessingMode = rocessingMode.Remote;

ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://localhost/reportserver");

ReportViewer1.ServerReport.ReportPath = "/Report Project1/Reconciliation";

List paramList = new List();

paramList.Add(new ReportParameter("StartDate", startdate.ToString(), false));

paramList.Add(new ReportParameter("EndDate", enddate.ToString(), false));

this.ReportViewer1.ServerReport.SetParameters(paramList);

ReportViewer1.Visible = true;

I am getting this error when iam trying to run this report:

The permissions granted to user 'COMPUTERNAME\ASPNET' are insufficient for performing this operation. (rsAccessDenied)"} System.Exception {Microsoft.Reporting.WebForms.ReportServerException}

can anyone suggest what I am doing wrong.

A: 

The problem is that your ASP.NET worker process does not have the permissions to do what you want.

Edit this user on the server (MACHINENAME\ASPNET), and give it more permissions (It may need write permissions etc).

You also will need to add MACHINENAME\ASPNET as a user to the SQL database SSRS is working with.

FlySwat
+1  A: 

You need to give your web app access to your reports. Go to your report manager (http://servername/reports/). I usually just give the whole web server "Browser" rights to the reports.

The account name of your server is usually Domain\servername$. So if you server name is "webserver01" and your domain is Acme, you would give the account Acme\servername$ Browser rights.

I think you could also fix it by disabling anonymous access (in IIS) on the web application you are running the report from, that way reporting services would authenticate using the users credentials instead of the ASPNET account. But that may not be a viable solution for you.

Erikk Ross
+1  A: 

To clarify Erikk's answer a little bit.

The particular set of security permissions you want to set to fix this error (there are at least another two types of security settings in Reports Manager) are available in the "security" menu option of the "Properties" tab of the reports folder you are looking at.

Obiously it goes without saying you should not give full permission to the "Everyone" group for the Home folder as this is inherited to all other items and subfolders and open a huge security hole.

Keith K