- In using the ReportViewer.aspx page inside a WebControl on a WPF app on SQL 2008 R2, if I user puts in an invalidate DateTime value (such as 7/32/2012) they get the following error:
- "
- The value provided for the report parameter 'ToDate' is not valid for its type. (rsReportParameterTypeMismatch)" as would be expected. When they go to correct this value and resubmit via "View Report" button click. The famous "An error has occured in the script on this page" - "Sys.WebForms.PageRequestManagerServerErrorException: An unkown error occured while processing the request ont he server. The status code returned from the server was: 500". This Script Error is the kiss of death as everything else in the ReportViewer.aspx hangs after this and all DateTime parameters are disabled until the app is reloaded. I've checked the log files (see below) and it looks like the issue is a bug with the invalid DateTime value in the PostBack on the control if I'm understanding this correctly. If I change the web.config file (C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\) so the page element disabled the enableEventValidation logic
- (<pages validateRequest="false" enableEventValidation="false">
- ) the error goes away, but the MS documentation for this indicates that this should not be disabled for security reasons. I don't know enough about the inner workings of SSRS in R2 and how it's serving up the web pages outside of IIS to know if this is an acceptable change or an issue they need to fix in code. Any suggestions?
library!ReportServer_0-1!27d0!08/23/2012-10:19:18::
e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportParameterTypeMismatchException: ,
Microsoft.ReportingServices.Diagnostics.Utilities.ReportParameterTypeMismatchException:
The value provided for the report parameter 'ToDate' is not valid for its type.;
library!ReportServer_0-1!27d0!08/23/2012-10:20:16::
e ERROR: Error rending control: System.ArgumentException:
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/>
in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature
verifies that arguments to postback or callback events originate from the server control that originally
rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation
method in order to register the postback or callback data for validation.
at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument)
at System.Web.UI.WebControls.HiddenField.LoadPostData(String postDataKey, NameValueCollection postCollection)
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
library!ReportServer_0-1!27d0!08/23/2012-10:20:16::
e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeException:
ArgumentException is encountered. Check inner exception for details.,
Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeException:
An error occurred in the HTTP Runtime object for application domain
ReportServer_MSSQLSERVER_0-1-129902080319431909. Most likely, the HTTP request contains
an unsupported verb or invalid syntax.
---> System.ArgumentException: Invalid postback or callback argument.
Event validation is enabled using <pages enableEventValidation="true"/> in configuration
or <%@ Page EnableEventValidation="true" %> in a page. For security purposes,
this feature verifies that arguments to postback or callback events originate from
the server control that originally rendered them. If the data is valid and expected,
use the ClientScriptManager.RegisterForEventValidation method in order to register the
postback or callback data for validation.
at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument)
at System.Web.UI.WebControls.HiddenField.LoadPostData(String postDataKey, NameValueCollection postCollection)
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---;
webserver!ReportServer_0-1!27d0!08/23/2012-10:20:16::
e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.UnhandledHttpApplicationException: ,
Microsoft.ReportingServices.Diagnostics.Utilities.UnhandledHttpApplicationException:
The report server encountered an unhandled exception in HttpApplication.
---> System.ArgumentNullException: Value cannot be null.
Parameter name: exception
at System.Web.UI.AsyncPostBackErrorEventArgs..ctor(Exception exception)
at System.Web.UI.PageRequestManager.OnPageError(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.TemplateControl.OnError(EventArgs e)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.pages_reportviewer_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)