Could not load file or assembly 'Microsoft.ReportViewer.WebForms'

后端 未结 13 2327
谎友^
谎友^ 2020-12-04 17:52

I am trying to use the report viewer in asp.net and have uploaded my site. However, when my page containing the report viewer is loaded, it shows the following error:

<
13条回答
  •  眼角桃花
    2020-12-04 18:11

    In order to Run Report Viewer On server with Data from Server

    A) Go to Project Property ----> Select Reference ------> Add Reference

    1) Import (Microsoft.ReportViewer.Common.dll)-----> (Path "C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer")

    2) Import (Microsoft.ReportViewer.ProcessingObjectModel.dll) -----> (Path "C:\Windows\Assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel")

    3) Import (Microsoft.ReportViewer.WebForms.dll)-----> (Path "C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer")

    B) In Above three DLL set its "Local Copy" to True so that while Building Deployment Package it will getcopied to "Bin" folder.

    C) Publish the Solution

    D) After that Upload all the files along with "Bin" folder with the help of "File Zilla" software to "Web Server".

    E) This will install DLL on server hence, client is not required to have "Report Viewer.dll".

    This worked for me.

提交回复
热议问题