Reports are deployed and working, verified in Report Manager.
报告被部署和工作,在报告管理器中验证。
My application is an MVC2 app with my report on its own aspx page. This page worked with version 8 of the report viewer control, but we moved to new servers, upgraded sql server, and are trying to update our website to match.
我的应用程序是一个MVC2应用程序,我的报告在它自己的aspx页面上。这个页面使用了报表查看器控件的8版本,但是我们转移到新的服务器,升级了sql server,并试图更新我们的网站以匹配。
The servers are Windows Server 2008 with IIS 7.5.
服务器是Windows Server 2008和IIS 7.5。
I am testing in both chrome and IE 9.
我正在测试chrome和ie9。
Despite my best efforts, I still get this error:
尽管我尽了最大的努力,我还是犯了这个错误:
Report Viewer Configuration Error
报表查看器配置错误
The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
to the system.web/httpHandlers section of the web.config file, or add<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
to the system.webServer/handlers section for Internet Information Services 7 or later.报表查看器Web控件HTTP处理程序尚未在应用程序的Web中注册。配置文件。添加 <添加动词= =“reserved.reportviewerwebcontrol“*”路径。axd microsoft.reporting.webforms“type="”。HttpHandler" microsoft.reportviewer。webforms, version="10.0.0," culture="中性,PublicKeyToken=b03f5f7f11d50a3a”/"> 到系统。web/ httphandler部分。配置文件,或添加
到系统。用于Internet信息服务7或更高版本的webServer/处理程序部分。
But, I've already done this. in fact, I even read this from MSDN:
但是,我已经做过了。事实上,我甚至从MSDN上读到:
To use IIS 7.0 in Integrated mode, you must remove the HTTP handler in system.web/httpHandlers. Otherwise, IIS will not run the application, but will display an error message instead.
要在集成模式下使用IIS 7.0,必须删除system.web/ httphandler中的HTTP处理程序。否则,IIS将不会运行应用程序,而是会显示一个错误消息。
Just to be safe, I tried a combo of neither while adding the handler into IIS directly, just the web server http handler in my config, just the http handler in my config, and both.
为了安全起见,我尝试了一个组合,既不直接将处理程序添加到IIS中,只在配置中添加web服务器http处理程序,只在配置中添加http处理程序,两者都使用。
Let's start with my web.config
让我们从我的web.config开始。
<configuration
<system.web>
<httpRuntime maxQueryStringLength="4096" />
<compilation targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</buildProviders>
</compilation>
</system.web>
<system.webServer>
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
</system.webServer>
</configuration>
I have the assemblies, the build provider, and the handler. What else could be wrong?
我有程序集、构建提供程序和处理程序。还有什么地方可能出错?
3 个解决方案
#1
6
I found a quick and dirty workaround - to your web config add this:
我发现了一个快速而肮脏的变通方法——在您的web配置中添加以下内容:
<location path="Reserved.ReportViewerWebControl.axd">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
I saw in fiddler that for some reason when page requested Reserved.ReportViewerWebControl.axd instead of getting HTTP 200 response server would send 302 - moved to login.aspx?returnurl="Reserved.ReportViewerWebControl.axd. So allowing all users to the handler path solves the problem.
我在fiddler中看到,当页面请求Reserved.ReportViewerWebControl时,这是有原因的。axd将发送302 -移动到login.aspx?returnurl="Reserved.ReportViewerWebControl.axd。因此,允许所有用户到处理程序路径可以解决这个问题。
#2
1
I thought its ReportViewer Rendering Issue on IIS7 I have manually mapped my reportviewer handle to IIS7 like this:
我认为IIS7上的ReportViewer呈现问题我已经将我的ReportViewer句柄手工映射到IIS7:
•Open Internet Information Services (IIS) Manager and select your Web application.
•打开Internet信息服务(IIS)管理器,选择您的Web应用程序。
•Under IIS area, double-click on Handler Mappings icon.
•在IIS区域下,双击处理程序映射图标。
•At the Action pane on your right, click on Add Managed Handler.
•在右侧的操作窗格中,单击Add managementhandler。
•At the Add Managed Handler dialog, enter the following:
•在添加托管处理程序对话框中,输入以下内容:
Request path: Reserved.ReportViewerWebControl.axd
请求路径:Reserved.ReportViewerWebControl.axd
Type: Microsoft.Reporting.WebForms.HttpHandler
类型:Microsoft.Reporting.WebForms.HttpHandler
Name: Reserved-ReportViewerWebControl-axd
名称:Reserved-ReportViewerWebControl-axd
•Click OK.
•单击OK。
also changed by web config by adding
也可以通过添加web配置进行更改
Still mine's not working. I thought the above solution would help others.
我仍然不工作。我认为上面的解决方案会对其他人有所帮助。
#3
-1
I have tries this by removing unwanted mvc assemblies from asp.net project. So the simple solution was to remove WebMatrix.*.dll from Bin folder in web project as that belongs to mvc framework.
我尝试过从asp.net项目中删除不需要的mvc程序集。所以简单的解决方法就是删除WebMatrix。*。web项目中的Bin文件夹中的dll,因为它属于mvc框架。
#1
6
I found a quick and dirty workaround - to your web config add this:
我发现了一个快速而肮脏的变通方法——在您的web配置中添加以下内容:
<location path="Reserved.ReportViewerWebControl.axd">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
I saw in fiddler that for some reason when page requested Reserved.ReportViewerWebControl.axd instead of getting HTTP 200 response server would send 302 - moved to login.aspx?returnurl="Reserved.ReportViewerWebControl.axd. So allowing all users to the handler path solves the problem.
我在fiddler中看到,当页面请求Reserved.ReportViewerWebControl时,这是有原因的。axd将发送302 -移动到login.aspx?returnurl="Reserved.ReportViewerWebControl.axd。因此,允许所有用户到处理程序路径可以解决这个问题。
#2
1
I thought its ReportViewer Rendering Issue on IIS7 I have manually mapped my reportviewer handle to IIS7 like this:
我认为IIS7上的ReportViewer呈现问题我已经将我的ReportViewer句柄手工映射到IIS7:
•Open Internet Information Services (IIS) Manager and select your Web application.
•打开Internet信息服务(IIS)管理器,选择您的Web应用程序。
•Under IIS area, double-click on Handler Mappings icon.
•在IIS区域下,双击处理程序映射图标。
•At the Action pane on your right, click on Add Managed Handler.
•在右侧的操作窗格中,单击Add managementhandler。
•At the Add Managed Handler dialog, enter the following:
•在添加托管处理程序对话框中,输入以下内容:
Request path: Reserved.ReportViewerWebControl.axd
请求路径:Reserved.ReportViewerWebControl.axd
Type: Microsoft.Reporting.WebForms.HttpHandler
类型:Microsoft.Reporting.WebForms.HttpHandler
Name: Reserved-ReportViewerWebControl-axd
名称:Reserved-ReportViewerWebControl-axd
•Click OK.
•单击OK。
also changed by web config by adding
也可以通过添加web配置进行更改
Still mine's not working. I thought the above solution would help others.
我仍然不工作。我认为上面的解决方案会对其他人有所帮助。
#3
-1
I have tries this by removing unwanted mvc assemblies from asp.net project. So the simple solution was to remove WebMatrix.*.dll from Bin folder in web project as that belongs to mvc framework.
我尝试过从asp.net项目中删除不需要的mvc程序集。所以简单的解决方法就是删除WebMatrix。*。web项目中的Bin文件夹中的dll,因为它属于mvc框架。