Click here to Skip to main content
15,887,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am very new to ASP.NET MVC. I am trying to incorporate .rdl file in ASP.NET MVC using an .aspx file. I created a .rdl file in SSRS. And an .aspx file in ASP.NET. Added ScriptManager and Reportviewer to it. Set the ProcessingMode="Remote", gave the correct path for ReportPath="" and the report server url for ReportServerUrl="".

When I ran the application, (one and only time) it worked (the first time) – at that time, the reportviewer width was small. I just changed the height and width values in reportviwer properties and tried to run again. Then it started giving this error.
Now, whenever I run the application I am getting the following error.
Firefox - Report Viewer Configuration Error
IE - 0x800a1391 - JavaScript runtime error: 'Microsoft' is undefined
for
“$create(Microsoft.Reporting.WebFormsClient.ReportViewer, {"_internalViewerId":"ReportViewer2_ctl03","id":"ReportViewer2"}, null, null); “ statement.

I tried almost everything I could find on the web to solve this without any luck.
The things that I have tried so far –
• recreated another .aspx file and tried to put new reportviwer
• Uninstalled and reinstalled reportviewer
• Deleted and added back the references in my application
• Followed the steps below to make changes in IIS manager (*****see below)
• Compared my web.config file with the one that somebody posted which worked fine. When I did this and made changes to reportviewe section, the whole application stopped working. Then I had to revert it back.

One thing that happened last night was, it gave a warning about version conflict (One or more dependent assemblies have version conflicts. Do you want to fix these conflicts by adding binding redirect records in the application configuration file?) and I pressed "Yes" for resolving it. After that (I think it is after that), the web.config file has become very small. Most of the stuff is gone from that file but the application is working just fine except the reporting part.

I had/have added all the statements that I could find (relevant) for this in my .config file.
Sample -
XML
<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" />
        <!-- Added the below line 5/11/2015-->
        <add extension=".rdl" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        <!-- End of Added the below line-->
      </buildProviders>

<httpHandlers>
     <add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</httpHandlers>

<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" />
    <!-- Required by Microsoft ReportViewer control --><remove name="ReportViewerWebControlHandler" />
</handlers>


But now it is all gone. As I said, my web.config file was long before but now it is really small.

I am not sure whether to delete the new (small) web.config file and replace it with the old one or not. I can share both (old as well as new) if you prefer to see.
I really don’t know what is going on. Help is truly appreciated.

Thanks a lot.


*****IIS Manager steps that i followed
• 1. Open Internet Information Services (IIS) Manager and select your Web application.
• 2. Under IIS area, double-click on Handler Mappings icon.
• 3. At the Action pane on your right, click on Add Managed Handler.
• 4. At the Add Managed Handler dialog, enter the following:
Request path: Reserved.ReportViewerWebControl.axd
Type: Microsoft.Reporting.WebForms.HttpHandler
Name: Reserved-ReportViewerWebControl-axd
• 5. Click OK.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900