0

Im trying to add ReportViewer assembly to my web.config file. I placed two dlls which taken from this directory:

  • Microsoft.ReportViewer.WebForms.dll from C:\Program Files (x86)\Microsoft Visual Studio 12.0\ReportViewer

  • Microsoft.reportviewer.common.dll from C:\Program Files\Microsoft
    Office\Office15\ADDINS\PowerPivot Excel Add-in

But it showing error when I run my webpage.

Line 14:     <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
Line 15:      <assemblies>
Line 16:         <add assembly="Microsoft.ReportViewer.WebForms" />
Line 17:         <add assembly="Microsoft.ReportViewer.Common" />
Line 18:       </assemblies>

The assembly stack trace is:

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.ReportViewer.WebForms
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Microsoft.ReportViewer.WebForms | Domain ID: 6
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/Dang/Documents/small/
LOG: Initial PrivatePath = C:\Users\Dang\Documents\small\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\Dang\Documents\small\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vleave/4204733b/f10534fe/Microsoft.ReportViewer.WebForms.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vleave/4204733b/f10534fe/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.DLL.
LOG: Attempting download of new URL file:///C:/Users/Dang/Documents/small/bin/Microsoft.ReportViewer.WebForms.DLL.
LOG: Attempting download of new URL file:///C:/Users/Dang/Documents/small/bin/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vleave/4204733b/f10534fe/Microsoft.ReportViewer.WebForms.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vleave/4204733b/f10534fe/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.EXE.
LOG: Attempting download of new URL file:///C:/Users/Dang/Documents/small/bin/Microsoft.ReportViewer.WebForms.EXE.
LOG: Attempting download of new URL file:///C:/Users/Dang/Documents/small/bin/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.EXE.
FullStack
  • 198
  • 7
  • 16

1 Answers1

0

You web config should have item similar to the below.

    <assemblies>            
            <add assembly="Microsoft.ReportViewer.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
            <add assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
    </assemblies>

 <buildProviders>
        <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
      </buildProviders>

 <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>


<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.ReportViewer.WebForms" publicKeyToken="89845dcd8080cc91" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file

Community
  • 1
  • 1
Snowlockk
  • 451
  • 2
  • 7
  • Thank for your answer. Now im getting this error.. WRN: Comparing the assembly name resulted in the mismatch: Major Version ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated. – FullStack May 05 '17 at 01:06