Shared Files Feature - Uploading Files

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/6/2012 1:55:32 PM
Gravatar
Total Posts 28
~Leslie

Shared Files Feature - Uploading Files

Using the Shared Files Feature, we are trying to upload about 1000 files to a folder, approx. 1 - 256 kb in size.  We are able to successfully load about 471 files and then the below error occurs.  Is there a setting somewhere in administration or web.config that would cause the below error that we can modify? Also, we are able to create a new folder and continue uploading without issue, so we were left to consider that we are hitting a config setting somewhere.

System.InvalidOperationException: Operation is not valid due to the current state of the object.
at System.Web.HttpRequest.FillInFormCollection()
at System.Web.HttpRequest.get_Form()
at System.Web.HttpRequest.get_HasForm()
at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)
at System.Web.UI.Page.DeterminePostBackMode()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Thanks,

Leslie

3/6/2012 2:06:06 PM
Gravatar
Total Posts 18439

Re: Shared Files Feature - Uploading Files

Hi Leslie,

See this thread for the background and a workaround for this issue, it is a change in behavior introduced in an ASP.NET security update.

Basically by default only up to 1000 form elements are allowed on postback, the workaround allows you to override that setting to allow more, but it is desireable to not override by too much.

For the Shared Files feature all the buttons and image buttons in the grid as well as lots of hidden viewstate fields for the grid is what adds up to cause this error.

Probably the best solution is to organize the files into folders with < 471 files so that the amount of form fields generated by the grid is within limits. But see the workaround mentioned in the linked thread if you want to increase that number.

Hope that helps,

Joe

3/6/2012 2:15:28 PM
Gravatar
Total Posts 28
~Leslie

Re: Shared Files Feature - Uploading Files

Okay, we'll look into your suggestion/workaround and I'll let you know how it goes.  Thanks!

You must sign in to post in the forums. This thread is closed to new posts.