I know this problem has already been discussed before. But in my case its different. Whenever I try to show .rdlc report it gave me an exception. I don't Understand what's the cause. I have tried to change some references in my config file but still not resolved. Am I missing something?
reportViewer1.LocalReport.EnableExternalImages = true;
ReportDataSource rds = new ReportDataSource("DataSet1", dtData);
reportViewer1.ProcessingMode = ProcessingMode.Local;
reportViewer1.LocalReport.DataSources.Add(rds);
reportViewer1.LocalReport.ReportPath = report_Path;
if (multipleDatasetSelected && SubReportSelected)
reportViewer1.LocalReport.SubreportProcessing += LocalReport_SubreportProcessing;
if (lstParan.Count > 0)
{
foreach (string key in lstParan.Keys)
{
reportViewer1.LocalReport.SetParameters(new ReportParameter(key, lstParan[key]));
}
}
this.reportViewer1.LocalReport.Refresh();
whenever the last line runs this.reportViewer1.LocalReport.Refresh();. I get and exception in report viewer =>
The WebResource.axd handler must be registered in the configuration to process this request.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<httpHandlers>
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
</httpHandlers>
</system.web>
</configuration>
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The WebResource.axd handler must be registered in the configuration to process this request.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<httpHandlers>
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
</httpHandlers>
</system.web>
</configuration>
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: The WebResource.axd handler must be registered in the configuration to process this request.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<httpHandlers>
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
</httpHandlers>
</system.web>
</configuration>]
System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrlInternal(Assembly assembly, String resourceName, Boolean htmlEncoded, Boolean forSubstitution, IScriptManager scriptManager, Boolean enableCdn) +9810367
System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrl(Type type, String resourceName, Boolean htmlEncoded, IScriptManager scriptManager, Boolean enableCdn) +201
System.Web.UI.ClientScriptManager.GetWebResourceUrl(Page owner, Type type, String resourceName, Boolean htmlEncoded, IScriptManager scriptManager, Boolean enableCdn) +102
System.Web.UI.ClientScriptManager.RenderWebFormsScript(HtmlTextWriter writer) +121
System.Web.UI.Page.BeginFormRender(HtmlTextWriter writer, String formUniqueID) +984
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +57
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +55
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +43
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +129
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +129
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +129
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14
System.Web.UI.Page.Render(HtmlTextWriter writer) +30
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1342
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4330.0