More in this section

Forums / General Discussions / System.InvalidOperationException - Collection was modified

System.InvalidOperationException - Collection was modified

6 posts, 0 answered
  1. Eric
    Eric avatar
    147 posts
    Registered:
    12 Nov 2007
    14 May 2010
    Link to this post
    I have some custom controls from another project that I've imported into SF4. I added the project DLL from a webapp as a reference and copy the ASCX files into the SF project.

    Simple controls work fine. But when I try to do data access, I get the exception below. Data access is done via NHibernate. The same control worked in 3.7 SP. If I set a breakpoint in the control, data access works fine, I can see the data via a quickwatch. But for some reason, the following exception is thrown. If I replace the data access with hard-coded values, the control renders fine.

    Any ideas?

    Collection was modified; enumeration operation may not execute.

    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: Collection was modified; enumeration operation may not execute.


    Stack Trace:

    [InvalidOperationException: Collection was modified; enumeration operation may not execute.]
       System.Collections.HashtableEnumerator.MoveNext() +7496809
       Telerik.Sitefinity.Web.SitefinityHttpModule.Context_EndRequest(Object sender, EventArgs e) +254
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 May 2010
    Link to this post
    Hello Eric,

    Thank you for using our services.

    We have been looking at our code to see if something might make NHibernate data access not work within the new version of Sitefinity. We would like to debug the application with your data access code. So if you could send us the controls we would be able to see if there is something wrong on our side.

    Thank you very much for your cooperation in advance.

    Greetings,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Eric
    Eric avatar
    147 posts
    Registered:
    12 Nov 2007
    14 May 2010
    Link to this post
    Can you send me an email or give me an email address to send it to? There are several DLLs I need to send.

    Thanks,
    Eric
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 May 2010
    Link to this post
    Hello Eric,

    Thank you for getting back to me.

    You can open a bug report referencing this form thread. Please do not us compiled code only. We need to be able to debug your code.

    Regards,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Eric
    Eric avatar
    147 posts
    Registered:
    12 Nov 2007
    14 May 2010
    Link to this post
    Done. Ticket #309885

    Let me know if you find anything or if I can be of assistance.

    Eric
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    18 May 2010
    Link to this post
    Hi Eric,

    Thank you for submitting the bug report.

    I have responded there. Unfortunately we cannot provide a quick fix build right now. Most probably the issue will be resolved for the beta coming in August.

    Best wishes,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
6 posts, 0 answered