2
Attempt To Migrate SmarterMail to New Server - Fail - Build 6928?
Problem reported by Douglas Brantley - 12/24/2018 at 3:21 PM
Submitted
Here are the steps I have taken to move SmarterMail to a new server.

00  - New Server - Running Windows Server 2012 R2, Fully Patched

01  - Old Server - Updated SmarterMail to Build 6928.
        No Problems. Worked Great.

02A  - New Server - Installed SmarterMail Build 6928, Completes

02B - Problem, Install Process Opens Browser localhost:9998 Fails
         Bad Request - Invalid Hostname
         HTTP Error 400. The request hostname is invalid.

03  - New Server - Stopped the SmarterMail Server on the New Sever

04  - Old Server - Stopped the SmartMail Service on the New Server

04A - Updated DNS Mail Host to New Server IP Address for SmarterMail

04B - Performed IPCONFIG /FLUSHDNS on the New Server

04C - PINGed each mail host name for each domain served in SmarterMail, success.

05  - Old Server - Created a ZIP file of the Domains folder

06  - Old Server - Created a ZIP file of the SmarterTools folder in Program Files (x86)

07  - Moved copies of the two ZIP files from the Old Server to the New Server

08  - New Server - UnZipped the ZIP files to their proper locations on the New Server

09  - New Server - Started the SmarterMail service on the New Server

10  - Nothing is Working

10A - New Server - Rebooted, No Change 

11  - New Server - Ran the SmarterMail  IISConfigurationTool.exe
        Tool finished without error.

12  - New Server - Uninstalled SmarterMail, Rebooted Server, Installed SmarterMail.
        Same problem.

13 - New Server - Wiped the Server Clean,
        Started Over, Repeated All of the Above.
        Same Problem.

I have moved SmarterMail several times without any issues. Now this.

Thanks in advance for any assistance.

db

9 Replies

Reply to Thread
0
Douglas Brantley Replied
Current Error Message in browser window when attempting to access the Web Interface:

________________________________________________________________________________________

Server Error in '/' Application.

Could not load file or assembly 'SmarterMail.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.BadImageFormatException: Could not load file or assembly 'SmarterMail.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'SmarterMail.Data' could not be loaded.

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace: 

[BadImageFormatException: Could not load file or assembly 'SmarterMail.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format.]   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0   System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +36   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +21   System.Reflection.Assembly.Load(String assemblyString) +28   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38 
[ConfigurationErrorsException: Could not load file or assembly 'SmarterMail.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format.]   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +726   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +196   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +45   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +172   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +111   System.Web.Compilation.BuildManager.ExecutePreAppStart() +156   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +695 
[HttpException (0x80004005): Could not load file or assembly 'SmarterMail.Data' or one of its dependencies. An attempt was made to load a program with an incorrect format.]   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +659   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +89   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +189

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3282.0 
0
Douglas Brantley Replied
Looking at the above error message and having the knowledge of the spec minimums for Build 6928...

The above error states:

"Version Information Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3282.0"  

But when I download the update from Microsoft.com for the .NET Framework Version 4.7,2 (KB4054530) and attempt the install, I get the following message"

".NET Framework 4.7.2 or a later update is already installed on this computer"

??


0
Douglas Brantley Replied
After the above failure I started over from scratch.

1 - Total rebuild of the server, delete everything, reformat, fresh install Windows Server 2012 R2, apply every patch.

2 - Install SmarterMail 16.3.6915.
     Create one mail domain. Ok it works.

3 - Apply Build 6925.
     Total fail.
     Same error message as above.

4 - Start over at step 1 and did NOT install Build 6925.

5 - Add all mail domains.

6 - Currently back in production with 16.3.6915

db
0
Nathan Replied
I do not think 2b is relevant but given this was the old default port for the 'lite' web server provided in previous versions we maintain a binding on localhost:9998 to prevent glitches.

Are the SmarterMail file pathes identical for 'program files' and 'domains' on the new and old server? They should be in the first instance.

Edit - Another thought is, did you stop IIS during the install of the binaries? Stop the application pool as a minimum but if you are likely to have users hitting webmail/eas/ews stop the service whilst the updated binaries install. 

Also, my temptation would have been to re-install 6928 over the top of itself on the new server to fix any missing elements.
0
echoDreamz Replied
Try making sure your application pool in IIS for the SmarterMail application is set to 64-bit, not 32.
0
Douglas Brantley Replied
Questions....

>>  Are the SmarterMail file pathes identical for 'program files'
>>  and 'domains' on the new and old server?

Yes. Exactly the same.

>>  ...did you stop IIS during the install of the binaries?
>>  Stop the application pool as a minimum 

Yes. Stopped the mail service, the web site in IIS and the Application Pool in IIS.

>>  Also, my temptation would have been to re-install 6928
>>  over the top of itself on the new server to fix any missing elements.

Yes. Re-installed Build 6928 at least five times.

0
Douglas Brantley Replied
Questions....

>>  Are the SmarterMail file pathes identical for 'program files'
>>  and 'domains' on the new and old server?

Yes. Exactly the same.

>>  ...did you stop IIS during the install of the binaries?
>>  Stop the application pool as a minimum 

Yes. Stopped the mail service, the web site in IIS and the Application Pool in IIS.

>>  Also, my temptation would have been to re-install 6928
>>  over the top of itself on the new server to fix any missing elements.

Yes. Re-installed Build 6928 at least five times.

0
Douglas Brantley Replied
Question....

>>  Try making sure your application pool in IIS
>>  for the SmarterMail application is set to 64-bit, not 32.

It was set to 32-bit at initial install.

Should SM v16 Application Pool be set to 32-bit or 64-bit?

SM v16 is currently working with a 32-bit Application Pool.

0
echoDreamz Replied
Should always be 64-bit... I dont remember specifically, but SM 16 may be built for ALL CPUS, which allows SM 16 to run on a x86 or x64 environment, whereas SM 17 is x64 only.

Reply to Thread