Over the last month, I developed a WebForm app in C# with VS2013. It is working perfectly when I debug it and almost perfectly too once published on my iis 7.5 server on a App Pool using .NET Framework v4.030319. The problem is that the report viewer control doesn't work, exactly like this blog:
http://blogs.msdn.com/b/webtopics/archive/2009/02/10/report-viewer-toolbar-does-not-render-properly-on-iis-7-0.aspx
or the 49 other blogs I have read in the last 4 days... I tried every solution suggested and none of them worked. I am 100% sure it's not due to my report because just for testing, I created a basic report (just a textbox, no parameters, no datasource) and a new project with one page that load this report and I got the same problem.
Here is the concerned code in the web.config file:
<system.web>
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" />
</httpHandlers>
<authentication mode="None" />
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
<add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</buildProviders>
</compilation>
<httpRuntime targetFramework="4.5" />
[...]
</system.web>
<system.webServer>
<modules>
<remove name="FormsAuthentication" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<add name="ReportViewerWebControl" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</handlers>
</system.webServer>
And yes, I the mapping is also created on the server. Can someone help me fix this problem. I'm a little distraught.
I finally resolved it by installing the followings on the server:
dotNetFx45
ReportViewer 2010 Redistributable
Microsoft Microsoft System CLR Types for SQL Server 2012
ReportViewer 2012 Runtime
and restart it after even if it's not asked. After that, the reports were displaying properly. The fact that I didn't get any error messages wasn't helping very much. Also, the server is on prod so I couldn't restart it every time I want. Anyway, it's working now and that's the only thing that matters. Thanks.
For me these 2 mentioned below and no server restart worked
ReportViewer 2010 Redistributable
ReportViewer 2012 Runtime
Thanks
Related
Error:
An error occurred during local report processing.
The definition of the report 'Include\Impresiones\Rport.rdlc' is invalid.
The definition of this report is not valid or supported by this version of Reporting Services.
The report definition may have been created with a later version of Reporting Services, or contain content that is not well-formed or not valid based on Reporting Services schemas.
Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition' which cannot be upgraded.
When I had VS2012 I could edit it without problem but now I updated to VS2019 and when I edited a report and I wanted to show it in the report viewer I get that error, how do I solve it?
In my web.config I have:
<system.web>
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*"
type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false"/>
</httpHandlers>
<compilation debug="true" targetFramework="4.5">
<assemblies>
<!--<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"/>-->
<add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Management, Version=4.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"/>-->
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
</buildProviders>
</compilation>
<pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID">
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/>
</controls>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<!--<add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler" resourceType="Unspecified" />-->
<!--<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"/>-->
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</handlers>
</system.webServer>
Upgrade Microsoft Reports to support Visual Studio 2019 / 2022
Run through the following steps to upgrade a project using Microsoft Report Viewer Runtimes 9-13 to Sql Server Reporting Services 14 or 15.
Backup Visual Studio solution
Check Microsoft Report Designer is installed for Visual Studio 2019 (min version 15.3.1) or Visual Studio 2022 (min version 17.0.0)
Uninstall or manually remove the following assembly references (any versions: 9.0.0.0, 10.0.0.0, 11.0.0.0, 13.0.0.0) from project
Microsoft.ReportViewer.WebForms
Microsoft.ReportViewer.Common
Install Microsoft.ReportingServices.ReportViewerControl.WebForms OR Microsoft.ReportingServices.ReportViewerControl.Winforms which includes both updated dll's
ASP.NET - For Target Runtime .NET 4.5.2 (14.0.0.0)
Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms -Version 140.1000.523
ASP.NET - For Target Runtime .NET 4.6 and above (15.0.0.0)
Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms -Version 150.1537.0
WinForms - For Target Runtime .NET 4.5.2 (14.0.0.0)
Install-Package Microsoft.ReportingServices.ReportViewerControl.Winforms -Version 140.1000.523
WinForms - For Target Runtime .NET 4.6 and above (15.0.0.0)
Install-Package Microsoft.ReportingServices.ReportViewerControl.Winforms -Version 150.1537.0
This will install the following assemblies to the project...
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.DataVisualization.dll
Microsoft.ReportViewer.Design.dll
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.ReportViewer.WebDesign.dll
Microsoft.ReportViewer.WebForms.dll
Microsoft.ReportViewer.WinForms.dll
In ASP.NET - The App_Code folder will have new SqlServerTypes directory containing Loader.cs.
and include package Microsoft.SqlServer.Types.14.0.314.76
This folder will also appear in any Library project the package is also installed in.
\SqlServerTypes\
- Loader.cs or Loader.vb
- readme.htm
\SqlServerTypes\x64\
- msvcr120.dll
- SqlServerSpatial140.dll
\SqlServerTypes\x86\
- msvcr120.dll
- SqlServerSpatial140.dll
If the App_Code directory is configured for VB.NET, a new VB class should be added called Loader.vb and the autogenerated Loader.cs can be removed from App_Code\SqlServerTypes.
Imports System
Imports System.IO
Imports System.Runtime.InteropServices
Namespace SqlServerTypes
Public Class Utilities
<DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)>
Public Shared Function LoadLibrary(ByVal libname As String) As IntPtr
End Function
Public Shared Sub LoadNativeAssemblies(ByVal rootApplicationPath As String)
Dim nativeBinaryPath = If(IntPtr.Size > 4, Path.Combine(rootApplicationPath, "SqlServerTypes\x64\"), Path.Combine(rootApplicationPath, "SqlServerTypes\x86\"))
LoadNativeAssembly(nativeBinaryPath, "msvcr120.dll")
LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial140.dll")
End Sub
Private Shared Sub LoadNativeAssembly(ByVal nativeBinaryPath As String, ByVal assemblyName As String)
Dim path = System.IO.Path.Combine(nativeBinaryPath, assemblyName)
Dim ptr = LoadLibrary(path)
If ptr = IntPtr.Zero Then
Throw New Exception(String.Format("Error loading {0} (ErrorCode: {1})", assemblyName, Marshal.GetLastWin32Error()))
End If
End Sub
End Class
End Namespace
Configuration
In ASP.NET update the web config for Target .NET 4.5.2 (Reporting Services 14.0.0.0)
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5.2">
<assemblies>
<!-- All assemblies updated to version 14.0.0.0. -->
<add assembly="Microsoft.ReportViewer.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.DataVisualization, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.Design, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.ProcessingObjectModel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.WebDesign, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.WinForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
</assemblies>
<buildProviders>
<!-- Version updated to 14.0.0.0. -->
<add extension=".rdlc"
type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
</buildProviders>
</compilation>
<httpRuntime targetFramework="4.5.2"/>
<httpHandlers>
<!-- Version updated to 14.0.0.0 -->
<add path="Reserved.ReportViewerWebControl.axd" verb="*"
type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"
validate="false"/>
</httpHandlers>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
<handlers>
<!-- Version updated to 14.0.0.0 -->
<add name="ReportViewerWebControlHandler" verb="*" path="Reserved.ReportViewerWebControl.axd" preCondition="integratedMode"
type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral" />
<bindingRedirect oldVersion="10.0.0.0-11.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Or Update Web config for Target .NET 4.6 and above (Reporting Services 15.0.0.0)
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.6">
<assemblies>
<!-- All assemblies updated to version 15.0.0.0. -->
<add assembly="Microsoft.ReportViewer.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.DataVisualization, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.Design, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.ProcessingObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.WebDesign, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.WinForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
</assemblies>
<buildProviders>
<!-- Version updated to 15.0.0.0. -->
<add extension=".rdlc"
type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
</buildProviders>
</compilation>
<httpRuntime targetFramework="4.6"/>
<httpHandlers>
<!-- Version updated to 15.0.0.0 -->
<add path="Reserved.ReportViewerWebControl.axd" verb="*"
type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"
validate="false"/>
</httpHandlers>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
<handlers>
<!-- Version updated to 15.0.0.0 -->
<add name="ReportViewerWebControlHandler" verb="*" path="Reserved.ReportViewerWebControl.axd" preCondition="integratedMode"
type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral" />
<bindingRedirect oldVersion="10.0.0.0-11.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Build the solution and confirm the whole project compiles.
Upgrade the reports to support the Visual Studio IDE if created in an older version of Visual Studio Report Designer.
Double click the report in Visual Studio and convert when prompted "Do you want to convert this Report". This will automatically update the XML to the current supported schema.
When the report has been upgraded, you must click Save to finalise the changes to the report file. A backup copy is automatically made of the original file and a new file is created in it's place.
Then when the report is viewed in an XML editor the following schema definition changes will have been made by the conversion tool.
On a report without report parameters
From: VS2013
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"
xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition"
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
To: VS2019 / VS2022
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition"
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
What a Default New VS2019 / VS2022 report uses
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
On a report with report parameters
From: VS2013
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"
xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition"
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
To: VS2019 / VS2022
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition"
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
The conversion tool adds a ReportParametersLayout block if report has ReportParameters element. For example;
<ReportParametersLayout>
<GridLayoutDefinition>
<NumberOfColumns>1</NumberOfColumns>
<NumberOfRows>1</NumberOfRows>
<CellDefinitions>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>0</RowIndex>
<ParameterName>Test</ParameterName>
</CellDefinition>
</CellDefinitions>
</GridLayoutDefinition>
</ReportParametersLayout>
If you click Cancel when prompted to convert the report, there is an option to manually Edit the schema.
It is possible to Edit the xml schema and downgrade the supported specification to allow the report to load in the current version of Visual Studio Report Designer.
Downgrade report from 2016 or 2010 to 2008 schema definition
If the Report was created in a newer unsupported version of the current Report Designer the upgrade will fail. The Report will need to be downgraded for the file to open in Visual Studio 2019.
Please try the following XML markup changes only if the automatic upgrade failed;
From: 2016 schema
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition"
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
From: 2016 schema including default font family
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition"
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"
xmlns:df="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition/defaultfontfamily"
MustUnderstand="df">
From: 2010 schema
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition"
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
To: 2008 schema
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
Then Downgrade the SSRS report by removing elements that are not used in the 2008 schema.
Remove the tag ReportSections but not any child elements for it
<ReportSections></ReportSections>
Remove the tag ReportSection but not any child elements for it
<ReportSection></ReportSection>
Remove the element ReportParametersLayout and all child elements (including GridLayoutDefinition)
<ReportParametersLayout></ReportParametersLayout>
If the report contains the default font attribute "df" remove the following also...
Remove the Report MustUnderstand="df" attribute if it has one.
Remove the Report xmlns:df attribute if it has one.
Remove the element df and all child elements if it has one.
For WinForms - Include file in output directory
If the project is WinForms, to include the report in the output directory right click on the Report file and click Properties.
Change the file Properties Copy To Output Directory to "Copy if newer" and Save project.
Finally: Build and Test
Once all changes have been saved, build the solution to confirm the project is correctly compiling using the SQL Server Reporting Services runtimes and then test processing an SSRS Local Report using your custom code.
Setting up SQL Server native assemblies for spatial data types
ASP.NET applications For ASP.NET applications, add the following line
of code to the Application_Start method in Global.asax.cs:
SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));
Desktop applications For desktop applications, add the following line
of code to run before any spatial operations are performed:
SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);
Report Viewer Control Versions
8.0 (2005) - 8.0.50727.42 - Visual Studio 2005
9.0 (2008) - 9.0.30729.1 - Visual Studio 2008
10.0 (2010) - 10.0.40219.1 - Visual Studio 2010
11.0 (2012) - 11.1.3452.0 - Visual Studio 2012/2013
12.0 (2014) for SQL Server 2014 - 12.0.2000.8 - SQL Server 2014
12.0 (2015 Report Viewer or using SSDT) - 12.0.2402.15 - Visual Studio 2015 (SSDT)
13.0 for SQL Server 2016 (NuGet) - 13.0.1700.305 - SQL Server 2016
13.0 for SQL Server 2016 - 13.0.x.x - SQL Server 2016 Feature Pack
14.0 (NuGet) - 14.0.1016.229 - Visual Studio 2017
14.0 (2017 SSDT) - 14.0.x.x - Visual Studio 2017 (SSDT)
15.0 (NuGet) - 15.0.1537.0 - Visual Studio 2017/2019/2022
15.0 (2017/2019 Report Designer Extension) - 15.0.1322.137 - VS 2017/2019 Report Designer
15.0 (2022 Report Designer Extension) - 15.0.1509.0 - VS 2022 Report Designer
We have rented a hosting that offers me to work with ASP.NET and .NET Framework 3.5; everything worked fine, until we got to the reporting part; where I had to created a dataset and a RDLC report. When I update my site, it doesn't start anymore because it does not recognize the report libraries.
How could I solve it please?
These entries were added to the web.config; without it, even my database-bound dataview worked fine:
I have a hard time reading the image; better post the config as code.
It looks like you are using traditional ASP.NET. I had used the following config in an previous project:
<compilation debug="false" targetFramework="4.5">
<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
<add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> </assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> </buildProviders>
</compilation>
Good Morning,
We have an existing application that is stable and error free on a Windows Server 2008R2 with IIS 7.5 / .NET 4.5.
We are planning a move to Windows Server 2012R2 with IIS 8.5 / .NET 4.5 and are now encountered the problem that the application (identical binaries / configuration) are indeed injected two ScriptResource.axd files, but both contain the same content (different URLs).
Because of this, the MicrosoftAjaxWebforms.js, which provides "Sys.WebForms" is missing and i'm getting the Error
Unable to get property 'PageRequestManager' of undefined or null reference
The problem is browser Independent on two independent virtual machines.
The application runs in classic mode, the web.config does not contain the < xhtmlConformance > tag.
There are all the latest server updates.
All other functionalities of the application are working properly.
I hope some of you encountered the same Problem and know the solution.
Greetings, Verni
EDITH:
Snippet of web.config (system.web section)
<system.web>
<httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="" targetFramework="4.5" enableVersionHeader="false" />
<sessionState timeout="30" mode="StateServer" stateConnectionString="tcpip=...:42424" />
<httpModules>
<add name="LinkPartnerModule" type="....LinkPartnerModule, ..." />
<add name="RedirectModule" type="....RedirectModule, ..." />
<add name="ScriptCompressorModule" type="ScriptCompressorModule, ..." />
</httpModules>
<httpHandlers>
<remove verb="*" path="scriptresource.axd"/> // added from StackOverflow
<add verb="*" path="*js.axd" type="ScriptCompressorHandler" />
</httpHandlers>
<compilation debug="false" defaultLanguage="c#" targetFramework="4.5">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Services.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<globalization culture="de-DE" enableClientBasedCulture="true" fileEncoding="utf-8" uiCulture="de" />
<pages compilationMode="Auto" styleSheetTheme="*" validateRequest="false" enableEventValidation="false" controlRenderingCompatibilityVersion="3.5" enableViewState="true" clientIDMode="AutoID">
</system.web>
<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="true" enableCaching="true" />
</scripting>
</system.web.extensions>
We had this issue as well for an application running in classic mode. The issue that time turned out to be multiple httphandlers registered for the .axd extension.
If you in your web.config make sure to remove any .axd handler before adding them it might resolve your issue.
Something like:
<remove verb="*" path="scriptresource.axd"/>
Edit:
When looking at your web.config I'm pretty sure the problem is related to the scriptcompressorhandler and module. As you stated this only happens using HTTPS and I suspect that what happens is that the module still runs over HTTPS but the handler does not. This means that the module sends the compressed version over to the regular scriptresource handler and a new copy of the script is outputted.
The solution would be to either activate scriptcompressorhandler over HTTPS as well or make sure the module is not run over HTTPS.
I fixed the Problem.
The reason was an misconfigured ARR (Application Request Router),
where SSL-Offloading was active.
The main reason of misconfiguration was the "function" that activates SSL-Offloading if no URL-Rewrite Rule is there with name like 'ARR_farmName_loadbalance_SSL'.
If this Rule will be deleted, the manager activates SSL-Offloading automatically.
Thanks to Robban, who brought me to HTTPS / SSL.
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=9.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> to the system.web/httpHandlers section of the web.config file
This error is coming . I have already mentioned this line in http handler but still getting this error
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=0000000000000000" validate="false" />
my html page markup is as follow
<%# Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Button ID="btnsubmit" runat="server" OnClick="GenerateReportButton_Click" />
<rsweb:ReportViewer ID="ReportViewer1" runat="server">
</rsweb:ReportViewer>
</asp:Content>
Web config assemblies section is as follows :
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
I was having the very same problem. What happened was I put the Report loading routine on Page_Load, and didn't wrap it in if (!IsPostBack). The ReportViewer makes a POST to the page, and that was triggering Page_Load and reloading the report, somehow messing it up. After putting everything inside if (!IsPostBack), it worked like a charm.
Could you check your web.config for handlers registered or not for ReportViewer. its should be like this
Handler
<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>
Also check assembly section in your web.config for ReportViewer, it should be like below.
<assemblies>
<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" />
The issue also went away for me when I changed the app pool from Integrated to Classic.
This issue arose for me after I changed the parameter of the stored procedure my query was calling without refreshing the dataset in the SSRS designer, so you could try this.
The last two days I have had the same issue.
This is not really an answer to the original question - just some additional information for those having the same problem.
The application I had the problem with has been developed in 2005 and is under development still.
So it has been ported from VS 2005 to VS 2008 to VS 2010 and lately to VS 2013. It seems this is when the error happened.
Somewhere in between the .NET framework has switched from .NET 3.5 to .NET 4.
I think (I did not verify) that with .NET 4 the report viewer *.dlls come as system libraries. Anyway this showed my GAC to me:
Only the first one, version 8, has been manually installed by myself (with the Reporting Viewer 2005 redistributable binary).
So in VS 2013, Resharper is thinking of version 11 and automatically changes those lines in web.config
<httpHandlers>
<!-- this is the correct one (if using Report Viewer 2005 / 8.0.0.0 -->
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
</httpHandlers>
<httpHandlers>
<!-- this is the wrong one inserted during the update (or maybe Resharper) -->
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
So long story short: It seems - at least in my case - this error points to a version conflict with the libraries used with visual studio and those used an runtime. The error given from Microsoft is a little bit misleading.
I don't have enough rep to comment on the existing answers, but the reason why may need to change your app pool from Integrated to Classic is because of this MSDN entry
With an Integrated app pool you only need the handlers part, with a Classic app pool you need both handlers and httpHandlers.
The same issue for me. The issue also went away for me
1)when I changed the app pool from Integrated to Classic.
2) change HTTP handler like this
<httpHandlers>
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" />
</httpHandlers>
I have not changed anything in the app pool just added this line:
<Add name = "Reserved-ReportViewerWebControl-axd" path = "Reserved.ReportViewerWebControl.axd" verb = "*" type = "Microsoft.Reporting.WebForms.HttpHandler" resourceType = "Unspecified" />
We were getting this exact same error from the Report Viewer web control when we upgraded to SSRS 2016. But we also could not access the SSRS Web Portal - we were getting a 503 error which led us here:
https://support.microsoft.com/en-gb/help/3171040/-http-503-service-unavailable-error-when-you-open-the-ssrs-web-portal-after-you-upgrade-to-ssrs-2016
Once we installed SQL Server 2016 Service Pack 1 everything worked.
If you're using WCF Services for retrieving data form the database, you might face this issue even if you've added the HTTP handler to your web.config file.
In this case you also have to add the service endpoints, behaviors and bindings to the web.config to make things work.
In my case, following line solved the problem for me :
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</handlers>
</system.webServer>
For IIS 7 or later
<system.webServer>
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</handlers>
</system.webServer>
In my case, It was resolved by adding the below lines just next to <system.web> in the web.config
<system.webServer>
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</handlers>
</system.webServer>
The issue was I was using IIS 7 or above on my server. The issue got resolved as I added this section to my code.
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</handlers>
</system.webServer>
We are trying to move our reports from Visual 2008 to Visual 2010, but we are not being capable of making ASP.NET ReportViewer control work on our IIS 7.5 machines. The OS is Windows 7.
We have moved all our refernces to Microsoft.Reporting.WebForms 10.0 in code and in config files as well. Our Web.config file is the following sections regarding ReportViewer:
<system.web>
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
validate="false" />
</httpHandlers>
<hostingEnvironment shutdownTimeout="30" shadowCopyBinAssemblies="false" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<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" />
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</buildProviders>
</compilation>
<authentication mode="Windows" />
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
<httpRuntime requestValidationMode="2.0" />
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<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" />
<add verb="GET" name ="CrystalImageHandler" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</handlers>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="4294967295" />
</requestFiltering>
</security>
</system.webServer>
When loading the aspx which contains the ReportViewer control we see only the toolbar of the Report Viewer and the rest of the page is blank. The source code of that page tells the following:
The Report Viewer Web Control HTTP
Handler has not been registered in the
application's web.config file. Add
to
the system.web/httpHandlers section of
the web.config file, or add to
the system.webServer/handlers section
for Internet Information Services 7 or
later.
We know that ReportViewer 10.0 does not work in classic mode and so the application pool is configured to be Integrated. We have tried removing the handles section from the system.web but with no luck.
Anyone could give us a clue of how to get a working configuration of an ASP.NET app with Report Viewer 10.0 over IIS 7.5?
Many thanks in advance.
Jose Antonio Arroba
We had a similar problem when moving our web page from IIS6.0 to IIS7.5 we had to move our httpH andlers from to see code sample below
<defaultDocument>
<files>
<add value="home.aspx" />
</files>
</defaultDocument>
<modules>
<add name="AccessDeniedModule" type="Senate.Leagis.Web.Common.Handlers.AccessDeniedModule, Senate.Leagis.Web, Culture=neutral, PublicKeyToken=132b49799d170825" />
</modules>
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
Had the same issue this morning. It looks like your web.config handlers are fine. Hint: if you need to know they are not fine, try viewing with chrome. It tended to show me error messages IE wasn't. Anyways, I solved my problem by adding an HTTP-Handler to my IIS7.5 In IIS manager, go to Handler Mappings and register the handler. Request Path:Reserved.ReportViewerWebControl.axd, Type select the correct version, click on Request Restrictions and specify "One of the following verbs" as GET,HEAD,POST,DEBUG
You might find the ending part of here useful
Try to add
<configuration>
<system.webServer>
<handlers>
<add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler" resourceType="Unspecified" />
.......
in web.config
Source