Operation is not valid due to the current state of the object

C#

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.

[java]

[InvalidOperationException: Operation is not valid due to the current state of the object.]

Microsoft.SharePoint.<wbr />WebControls.SPControl.<wbr />SPWebEnsureSPControl(<wbr />HttpContext context)

Microsoft.SharePoint.<wbr />Utilities.SPUtility.<wbr />DetermineLayoutsUrl(SPWeb overrideWeb, HttpContext context, Boolean includeLCID, Boolean doNotInitWeb)

Microsoft.SharePoint.<wbr />Utilities.SPUtility.<wbr />DetermineRedirectUrl(String urlProposed, SPRedirectFlags flags, HttpContext context, SPWeb overrideWeb, String queryString, String& urlRedirect)

Microsoft.SharePoint.<wbr />Utilities.SPUtility.Redirect(<wbr />String url, SPRedirectFlags flags, HttpContext context, String queryString)

Microsoft.SharePoint.<wbr />Utilities.SPUtility.<wbr />HandleAccessDenied(HttpContext context)

Microsoft.SharePoint.<wbr />IdentityModel.<wbr />SPFederationAuthenticationModu<wbr />le.OnEndRequest(Object sender, EventArgs args)

System.Web.<wbr />SyncEventExecutionStep.System.<wbr />Web.HttpApplication.<wbr />IExecutionStep.Execute()

System.Web.HttpApplication.<wbr />ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

[/java]

Solution : Try adding the following setting in your web.config's <appsettings> block. in this block you are maximizing the MaxHttpCollection values this will override the defaults set by .net Framework. you can change the value accordingly as per your form needs.

[java]

<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="2001" />
</appSettings>

[/java]

 
Share on Google Plus

About JK STACK

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

3 comments:

  1. Much obliged to you again for all the learning you distribute, Good post. I was exceptionally intrigued by the article, it's entirely rousing I ought to buy google reviews concede. I like going by you site since I generally run over fascinating articles like this one. Great Job, I enormously acknowledge that.Do Keep sharing! Respects,

    ReplyDelete
  2. Evolution Gaming Casino (2021 Review)
    Evolution Gaming is a popular gaming brand 슬롯 가입 쿠폰 that's been around since it launched bet365 kor in 2004. This is an excellent 스포츠사이트 and honest review of the gaming platform  해외에서축구중계사이트 Rating: 샌즈 3.9 · ‎Review by OnCasinos

    ReplyDelete
  3. i was so excited to see your post. No I'm helpful to continue my work. You can check my websiteSmm course

    ReplyDelete