Rebuild Search Index - log4net issue

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
4/3/2019 9:38:24 AM
Gravatar
Total Posts 30

Rebuild Search Index - log4net issue

I'm running 2 different mojoPortal sites, one is 2.6.0.0 and one is 2.7.0.0.  On both, when I try to rebuild the search index it fails and gives several errors in the Windows event log.  I've tried various configurations of mapping log4net.dll versions within the web.config and cannot get it to work.  Here are the Windows messages:

An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/2/ROOT

Process ID: 5200

Exception: System.IO.FileLoadException

Message: Could not load file or assembly 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

StackTrace:    at WebStore.UI.Helpers.OfferSearchIndexBuilder.RebuildIndex(PageSettings pageSettings, String indexPath)
   at mojoPortal.SearchIndex.IndexHelper.RebuildSiteIndex(String indexPath, IEnumerable`1 menuPages)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

--------------------------

Exception information: 
    Exception type: HttpException 
    Exception message: Could not load file or assembly 'log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

Could not load file or assembly 'log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at mojoPortal.Web.Global.Application_Start(Object sender, EventArgs e)

 

 

4/3/2019 12:02:47 PM
Gravatar
Total Posts 30

Re: Rebuild Search Index - log4net issue

Found a work around.  Had to put a copy of the old version of log4net.dll in a subfolder of bin and then add the following to the web.config:

    <dependentAssembly>
        <assemblyIdentity name="log4net" publicKeyToken="1b44e1d426115821" />
        <codeBase version="1.2.11.0" href="bin\log4net.1.2.11\log4net.dll" />
    </dependentAssembly>

4/3/2019 2:48:44 PM
Gravatar
Total Posts 2253

Re: Rebuild Search Index - log4net issue

Hi Rob,

That work around should work fine. To fix the issue, upgrade the version of WebStore you have on your site. We made the WebStore a separate project, with separate download, when we released mojoPortal 2.6. 

Thanks,
Joe D.

4/3/2019 2:51:10 PM
Gravatar
Total Posts 30

Re: Rebuild Search Index - log4net issue

Thanks Joe.  I never installed the Web Store.  How do I remove it from my sites?

Rob

4/3/2019 4:31:36 PM
Gravatar
Total Posts 2253

Re: Rebuild Search Index - log4net issue

Hi Rob,

It used to come with mojoPortal, so it was installed by default. We felt like it was not nearly to the point of a proper webstore so we removed it from the releases. 

So, to remove it from your installations, do the following:

  • Go to Administration > Advanced Tools > Feature Installation/Configuration
  • Click the settings gear next to WebStore
  • Click the delete button.
  • Go to the file system for the installation and delete the following folders/files
    • <install directory>/WebStore
    • <install directory>/bin/WebStore.Business.dll
    • <install directory>/bin/WebStore.Data.dll
    • <install directory>/bin/WebStore.UI.dll
    • <install directory>/setup/application/webstore
    • <install directory>/setup/ProviderConfig/worldpayresponsehandlers/webstoreworldpayresponsehandler
    • <install directory>/setup/ProviderConfig/sitepredeletehandlers/009_webstoredeleter.config
    • <install directory>/setup/ProviderConfig/paypalreturnhandlers/webstorepaypalhandler.config
    • <install directory>/setup/ProviderConfig/paypalpdthandlers/webstorepaypalpdthandler.config
    • <install directory>/setup/ProviderConfig\paypalipnhandlers/webstorepaypalipnhandler.config
    • <install directory>/setup/ProviderConfig/indexbuilders/webstoreproductindexbuilder.config
    • <install directory>/setup/ProviderConfig/indexbuilders/webstoreofferindexbuilder.config
    • <install directory>/setup/ProviderConfig/gcheckoutnotificationhandlers/webstoregcheckout.config
    • <install directory>/setup/ProviderConfig/contentdeletehandlers/webstoredeletehandler.config

For those items in the <install directory>/setup/ProviderConfig folders, you could just do a search on the ProviderConfig folder itself for webstore and delete any items found.

Thanks,
Joe

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