November Happy Hour will be moved to Thursday December 5th.

Search and replace error

Vote:
 
Hi! I'm using EPiServers code for search and replace, But wen I try to use it I get an odd, runtime error. I think I've seen this error before but I don't remember the solution for it. Does any one have a solution? Here is the stacktrace: Line 146: Line 147: if (save) Line 148: EPiServer.Global.EPDataFactory.Save(page, SaveAction.Publish); Line 149: Line 150: count++; Source File: C:\inetpub\XXXXXX\Plugin\SearchAndReplace.aspx.cs Line: 148 Stack Trace: [ArgumentException: Item has already been added. Key in dictionary: 'ReloadEdit' Key being added: 'ReloadEdit'] System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +2881331 System.Collections.Hashtable.Add(Object key, Object value) +11 DropIT.Plugin.Extension.HttpModule.EPDataFactory_SavedPage(Object sender, PageEventArgs e) +2440 EPiServer.PageEventHandler.Invoke(Object sender, PageEventArgs e) +0 EPiServer.DataFactory.?(PageEventArgs , Object ) +67 EPiServer.DataFactory.Save(PageData page, SaveAction action, AccessLevel access) +1062 EPiServer.DataFactory.Save(PageData page, SaveAction action) +214 SearchAndReplacePlugIn.SearchAndReplace.SearchAndReplaceInProperty(String propertyName, String searchText, String replaceWith, Boolean save) in C:\inetpub\XXXXXX\Plugin\SearchAndReplace.aspx.cs:148 SearchAndReplacePlugIn.SearchAndReplace.DoSearchAndReplace(Object sender, EventArgs e) in C:\inetpub\XXXXXX\Plugin\SearchAndReplace.aspx.cs:204 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
#13263
Nov 07, 2007 8:26
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.