Hi guys,
I have a asp.net web application in c#,
where i'm fetching data from excel sheet and filling this in a repeater via datatable.
This excel sheet contains 650 rows and 20 columns.
it is fetching all the records and filling the repeater also.
But when i'm trying to push this data to server,
i'm getting this Error
Operation is not valid due to the current state of the object.
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: Operation is not valid due to the current state of the object.
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: Operation is not valid due to the current state of the object.]
System.Web.HttpRequest.FillInFormCollection() +9038554
System.Web.HttpRequest.get_Form() +104
System.Web.HttpRequest.get_HasForm() +9039071
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97
System.Web.UI.Page.DeterminePostBackMode() +69
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +135
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
i have searched on internet regarding this error n i got some solutions.
where i have tried,
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="5000" />
<add key="aspnet:MaxJsonDeserializerMembers" value="5000" />
<add key="FolderPath" value="Files/"/>
</appSettings>
still i'm getting the same error.
Can anyone please help me.
Thanks