Error: 'Could not load file or assembly 'MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies' when loading the GFI MailArchiver web interface

PROBLEM

The following error is displayed when loading the web interface of MailArchiver:
 
Server Error in '/MailArchiver' Application.
 
Configuration Error
 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
 
Parser Error Message: Could not load file or assembly 'MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
 
Source Error:
 
Line 245: <providers>
Line 246: <add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 247: <add name="MySQLProfileProvider" type="MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />
Line 248: </providers>
Line 249: </profile>
 
Source File: C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\Config\web.config    Line: 247
 
The debug log ..\MailArchiver\ASPNET\UI\DebugLogs\UserProfileHelper.log reads:
 
2013-10-16,12:50:24,796,1,"#00001E14","#00000010","info   ","UserProfileHelper","Could not get LastMailArchiverIAccessed from profile, Details:System.Configuration.ConfigurationErrorsException: Could not load file or assembly 'MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config line 247) ---> System.IO.FileNotFoundException: Could not load file or assembly 'MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
;   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
;   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
;   at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
;   at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
;   at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
;   --- End of inner exception stack trace ---
;   at System.Web.Profile.ProfileBase.InitializeStatic()
;   at System.Web.Profile.ProfileBase.Create(String username, Boolean isAuthenticated)
;   at System.Web.HttpContext.get_Profile()
;   at MArc.Web.UserProfileHelper.GetLastMailArchiverIAccessed()"

ENVIRONMENT

  • GFI MailArchiver
  • MySQL is installed on the server and tied into IIS

SOLUTION

  1. Open the folder ..\MailArchiver\ASPNET\UI 
  2. Create a sub-folder named Backup 
  3. Make a copy of the file web.config and place it into the Backup subfolder 
  4. Open web.config in notepad.exe
  5. Find the section which reads
    • <profile defaultProvider="MyProvider">
    •      <providers>
    •         <add name="MyProvider" type="MarProvider.MArcProfileProvider" profileStorePath="" />
    •      </providers>
  6. Add the following line to the <providers> section:
    • <remove name="MySQLProfileProvider" />
  7. The result should look like:
    • <profile defaultProvider="MyProvider">
    •      <providers>
    •        <add name="MyProvider" type="MarProvider.MArcProfileProvider" profileStorePath="" />
    •        <remove name="MySQLProfileProvider" />
    •      </providers>
  8. Save the file

CAUSE

Internet Information Services (IIS) is configured in a conflicting way.