Reputation: 627
Server Error in '/' Application.
Invalid postback or callback argument. Event validation is enabled using 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. 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.ArgumentException: Invalid postback or callback argument. Event validation is enabled using 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.
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:
[ArgumentException: Invalid postback or callback argument. Event validation is enabled using 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.] System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +323 System.Web.UI.WebControls.HiddenField.LoadPostData(String postDataKey, NameValueCollection postCollection) +56 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +558 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34237
Some of the Points:
1) We have migrated framework from 2.0 to 4.5.1 on production in this release after that we are facing this problem.
2) We have auto session log out when user idle for 15 minute and at the time system is giving above error.
Please help me about as it is very critical for me and continue occurring in production.
Please let me know if you required more information from my end.
Upvotes: 0
Views: 781
Reputation: 425
Please try this:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string serverName = new Uri(ConfigurationSettings.AppSettings["ReportUrl"]).Host;
ReportViewer1.ServerReport.ReportServerUrl =New Uri("http://" + serverName + "/ReportServer");
ReportViewer1.ServerReport.ReportServerCredentials = new ReportServerCredentials( ConfigurationSettings.AppSettings["ReportUserName"], ConfigurationSettings.AppSettings["ReportPassword"], ConfigurationSettings.AppSettings["ReportDomain"]);
}
}
Upvotes: -1