This project is read-only.

Search followed by a search causes an error?

Jul 14, 2007 at 3:36 AM
I can't replicate this on whim, so ...

Has anyone run into search issues with BlogEngine.NET? I'm using 1.0, and while I don't use search a lot, I've probably used it half-a-dozen times. Every once in a while (read two or three times) searching immediately after a search results in an error - something to the effect of the collections changing ... ? (Once I get the error I'll post it.)

Again, just trying to track down a way to get it to happen so it can be reported as an issue (if that's the case) or get it sorted out on my end (if that's the case) ...

Jul 15, 2007 at 6:45 PM
I did a search for 'apache' on my site, which returned no results, and I then immediately did a search for 'Apache'. Below is the error information:

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.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) +48
System.Collections.Generic.Enumerator.MoveNext() +24
Search.BuildResult(String query) +119
Search.Hits(List`1 postsToSearch, String searchTerm, Boolean includeComments) +212
_default.DisplaySearch() +113
default.PageLoad(Object sender, EventArgs e) +554
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
BlogEngine.Core.Web.Controls.BlogBasePage.OnLoad(EventArgs e) +10
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42