404 error on report viewer contorol in asp .net while hosting on IIS 7 issue solved

If you are facing the problem rendering report viewer elements while loading the report viewer on browser

 Why it happens?

The answer is IIS7 Handler Mappings does not contain Reserved.ReportViewerWebControl.axd httpHandler, and therefore unable to render the ReportViewer elements needed by the JavaSript.


 What is the Solution?

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

What happens to your web application after you do above setting in IIS ?



Reserved-ReportViewerWebControl-axd handler is now added to your Handler Mappings list. Notice that the following line has also been added to your Web.config file under the system.webserver's handler section:


<add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd"
verb="*" type="Microsoft.Reporting.WebForms.HttpHandler" resourceType="Unspecified"
/>

Now Reportviwer will start running seamlessly!!!!!!!!!!!!!!!!

Comments

Popular posts from this blog

Restore the lost focus of Auto post back controls in asp.net update Panel control

Clone a generic list in C# using extension method

Add Comma automatically while entering amounts in textbox using Javascript