Answer
PROBLEM
Consider the following symptoms:
- Archiver was recently migrated to a new server (most likely from a 32bit platform to a 64bit platform)
- When trying to open the web interface, the page does not load successfully and the following error is shown:
- Failed to authenticate: AuthenticationFailed
- There was no endpoint listenting at net.pipe://localhost/Core/CSService
Debug logging in ..\Core\Debuglogs:
"info ","WCFPlugin"," Loading Plug-in: 'MArc.ConfigurationService.CSService' from 'bin\MArc.ConfigurationService.dll'. "
"info ","WCFPlugin"," Loading Plug-in Contract: 'MArc.ConfigurationService.Base.ICSSettingsHolder' from 'bin\MArc.ConfigurationService.Base.dll'. "
"info ","WCFPlugin"," Service instance created successfully"
"error ","WCFPlugin","Error: Failed to create service instance: MArc.ConfigurationService.CSService, bin\MArc.ConfigurationService.dll. Error: MArc.ConfigurationService.Base.ConfigurationServiceException: SettingsDbCreationFailed ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
; at FB_1236665269_Class.isc_create_database(IntPtr[] statusVector, Int16 dbNameLength, Byte[] dbName, Int32& dbHandle, Int16 parmBufferLength, Byte[] parmBuffer, Int16 dbType)
; at FirebirdSql.Data.Client.Native.FesDatabase.CreateDatabase(DatabaseParameterBuffer dpb, String dataSource, Int32 port, String database)
; at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.CreateDatabase(DatabaseParameterBuffer dpb)
; at FirebirdSql.Data.FirebirdClient.FbConnection.CreateDatabase(String connectionString, Int32 pageSize, Boolean forcedWrites, Boolean overwrite)
; at MArc.ConfigurationService.Dal.StorageProvider.CreateDatabase()
; --- End of inner exception stack trace ---
; at MArc.ConfigurationService.Dal.StorageProvider.CreateDatabase()
; at MArc.ConfigurationService.Dal.StorageProvider.Load()
; at MArc.ConfigurationService.CSService.Init(String configDir)
; at MArc.WCF.Host.LoadComponents()"
"info ","CSStorageProvider",">>Creating database as [MArcSettings.bin]"
"info ","CSStorageProvider","Creating database..."
"error ","CSStorageProvider","error: CreateDatabase() - An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
"info ","WCFPlugin"," Loading Plug-in Contract: 'MArc.ConfigurationService.Base.ICSSettingsHolder' from 'bin\MArc.ConfigurationService.Base.dll'. "
"info ","WCFPlugin"," Service instance created successfully"
"error ","WCFPlugin","Error: Failed to create service instance: MArc.ConfigurationService.CSService, bin\MArc.ConfigurationService.dll. Error: MArc.ConfigurationService.Base.ConfigurationServiceException: SettingsDbCreationFailed ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
; at FB_1236665269_Class.isc_create_database(IntPtr[] statusVector, Int16 dbNameLength, Byte[] dbName, Int32& dbHandle, Int16 parmBufferLength, Byte[] parmBuffer, Int16 dbType)
; at FirebirdSql.Data.Client.Native.FesDatabase.CreateDatabase(DatabaseParameterBuffer dpb, String dataSource, Int32 port, String database)
; at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.CreateDatabase(DatabaseParameterBuffer dpb)
; at FirebirdSql.Data.FirebirdClient.FbConnection.CreateDatabase(String connectionString, Int32 pageSize, Boolean forcedWrites, Boolean overwrite)
; at MArc.ConfigurationService.Dal.StorageProvider.CreateDatabase()
; --- End of inner exception stack trace ---
; at MArc.ConfigurationService.Dal.StorageProvider.CreateDatabase()
; at MArc.ConfigurationService.Dal.StorageProvider.Load()
; at MArc.ConfigurationService.CSService.Init(String configDir)
; at MArc.WCF.Host.LoadComponents()"
"info ","CSStorageProvider",">>Creating database as [MArcSettings.bin]"
"info ","CSStorageProvider","Creating database..."
"error ","CSStorageProvider","error: CreateDatabase() - An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
ENVIRONMENT
- GFI Archiver
- 64bit version of GFI Archiver and while having recently migrated from a 32bit version
SOLUTION
- Create a full system backup including data
- Uninstall GFI Archiver
- Delete DLL/EXE files which might still reside within the GFI Archiver installation folder by following step 6 of the Moving Archiver to a New Server article.
- Reinstall GFI Archiver into the existing installation folder
CAUSE
DLL and/or EXE files are present on the system which belong to the 32bit version of GFI Archiver and not to the 64bit version.