如何解决此错误:授予用户“COMPUTERNAME\\ASPNET”的权限 不足以执行此操作。 (拒绝访问)
我正在尝试将 SSRS 报告集成到我的网页中。 代码如下:
ReportViewer1.ProcessingMode = rocessingMode.Remote;
ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://localhost/reportserver");
ReportViewer1.ServerReport.ReportPath = "/Report Project1/Reconciliation";
List<ReportParameter> paramList = new List<ReportParameter>();
paramList.Add(new ReportParameter("StartDate", startdate.ToString(), false));
paramList.Add(new ReportParameter("EndDate", enddate.ToString(), false));
this.ReportViewer1.ServerReport.SetParameters(paramList);
ReportViewer1.Visible = true;
当我尝试运行此报告时,出现此错误:
The permissions granted to user 'COMPUTERNAME\\ASPNET' are insufficient for performing this operation. (rsAccessDenied)"}
System.Exception {Microsoft.Reporting.WebForms.ReportServerException}
谁能告诉我我做错了什么?
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<ReportParameter> paramList = new List<ReportParameter>();
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 get this error when I try 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 tell me what I am doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
稍微澄清一下埃里克的答案。
您想要设置来修复此错误的特定安全权限集(报告管理器中至少还有另外两种类型的安全设置)可在您所在的报告文件夹的“属性”选项卡的“安全”菜单选项中找到。看着。
显然,不言而喻,您不应该向主文件夹的“Everyone”组授予完全权限,因为它会继承到所有其他项目和子文件夹,并打开一个巨大的安全漏洞。
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.
您需要让您的网络应用程序访问您的报告。 转到您的报告管理器 (http://servername/reports/)。 我通常只是授予整个网络服务器对报告的“浏览器”权限。
您的服务器的帐户名通常是 Domain\servername$。 因此,如果您的服务器名称是“webserver01”并且您的域是 Acme,您将授予帐户 Acme\servername$ 浏览器权限。
我认为您还可以通过在运行报告的 Web 应用程序上禁用匿名访问(在 IIS 中)来修复此问题,这样报告服务将使用用户凭据而不是 ASPNET 帐户进行身份验证。 但这对您来说可能不是一个可行的解决方案。
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.
问题是您的 ASP.NET 工作进程没有执行您想要执行的操作的权限。
在服务器上编辑此用户(MACHINENAME\ASPNET),并为其授予更多权限(可能需要写入权限等)。
您还需要将 MACHINENAME\ASPNET 作为用户添加到 SSRS 正在使用的 SQL 数据库中。
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.