Search not working

Topics: User Forum
Nov 28, 2007 at 9:52 PM
I have my website up and running and everything appears to be working. However, when I select "Search" and enter a value I get the following error:

Value cannot be null.
Parameter name: collection

Line 174:
Line 175: foreach (ISection section in page.Sections)
Line 176: foundSections.AddRange(section.Search(searchString, page));
Line 177: }
Line 178: return foundSections;

I know the search value appears within my site. The value is the name of one of my pages. The value also appears several times within the HTML text on that page.

This happens on both the production server site and the development site on my computer. Do I need to do something special to get the search to work?

Thanks for your help.
Dec 15, 2007 at 1:57 AM
I am still having the same problem. Here is the stack:

[ArgumentNullException: Value cannot be null.
Parameter name: collection]
System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) +41
System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) +2390917
System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection) +15
MyWebPagesStarterKit.WebSite.Search(String searchString) in d:\Inetpub\wwwroot\mysite\App_Code\WebSite.cs:176
Search.Page_PreRender(Object sender, EventArgs e) in d:\Inetpub\wwwroot\mysite\Search.aspx.cs:44
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.OnPreRender(EventArgs e) +2069324
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

It appears to be searching the code, why is it not finding the search value?