Wednesday, November 28, 2012

MDS - Operation is not valid due to the current state of the objec


If you have a large model and you are trying edit security settings in MDS(Master Data Services) you may get the following error:

An unknown error occurred.

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

or
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.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) +11371791
   System.Web.HttpRequest.FillInFormCollection() +329

[HttpException (0x80004005): The URL-encoded form data is not valid.]
   System.Web.HttpRequest.FillInFormCollection() +11485906
   System.Web.HttpRequest.get_Form() +157
   System.Web.HttpRequest.get_HasForm() +11486708
   System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +141
   System.Web.UI.Page.DeterminePostBackMode() +100
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +259

Solution
Thanks to the MS MDS support team you need to add the following to the web.config file located C:\Program Files\Microsoft SQL Server\110\Master Data Services\WebApplication

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

appSettings is located near the end of the file. If the error is still occurring increase the value 10000

No comments:

Post a Comment