2
WebMail on SM17 return Error 500
Problem reported by Christophe Winzenried - 4/7/2020 at 4:22 AM
Resolved
After upgradig from SM16 to SM17 the service work fine. but now i can't  access to the webmail anymore. the configtool from samrtermail do not help. How can i ckeck the rights on the folders and in iis needed to run samrtermail 17 on my server win2016?

thanks

15 Replies

Reply to Thread
0
Christophe Winzenried Replied
Had to go back to the previous version because it is a productive server and the service cannot be operated without administration. So I uninstalled SM17, installed SM16, config files restored. SM16 is running perfectly again. Are there any files that could prevent a new update?
1
Kyle Kerst Replied
Employee Post
Christophe, I've reviewed your issue description and it sounds like you may have had an issue with your MRS directory or with its permissions as you've mentioned. If you go about trying this again, please try this: 

1. Uninstall SmarterMail. 
2. Navigate to the installation directory of SmarterMail and rename the MRS folder to MRS_OLD
3. Install the new version of SmarterMail. 

If you receive an error on the web interface please check to ensure the MRS directory is configured to allow Full Control for NetworkService, and that your SmarterMail application pool (in IIS) is configured to run as NetworkService. Please update me on your results if you give this another go. Have a great day!
Kyle Kerst IT Coordinator SmarterTools Inc. www.smartertools.com
0
Christophe Winzenried Replied
@Kyle thank you  --- The rights were ok. Are the same as SM16. I haven't dared to try the update again. How can a previous update attempt for a new success update be deleted? Are there any json files that need to be deleted first? I have a productive system. Is there an update protocol? In the event of problems, I can't wait until a customer complains that his domain no longer works. I've been using SM since version 4, but never has an update been such a poker.
0
Kyle Kerst Replied
Employee Post
@Christophe; you're very welcome!

Pre-upgrade, all of your configurations will be of XML type, and will be found here:

C:\Program Files (x86)\SmarterTools\SmarterMail\Service\

Post-upgrade, these XML files are converted to JSON format and are stored in the Settings directory within the Settings directory. So, to revert any conversions implemented by the previous upgrade process you'll want to check for the presence of JSON files within: 

C:\Program Files (x86)\SmarterTools\SmarterMail\Service\Settings

Deleting those JSON files should make your installation appear to be a pre-upgrade environment, and this will cause SmarterMail to reconvert the XML files into JSON during the upgrade process. Overall I'm sorry to hear you're having so much trouble with this upgrade process, and I can definitely understand concern in attempting it again. Your best line of defense on this is to get a full backup of the installation and domain storage locations before getting started. This will provide you a fall-back point should anything go wrong, as you'll be able to restore the entirety of the environment. Backup/Restore procedures are outlined here: 


If you'd prefer to have our team carry out the upgrade for you - we do offer these services - and would be happy to help get this going in the right direction. Below you will find more details about those ticket types: 


I hope that helps smooth out this process a bit for you. Have a great day!
Kyle Kerst IT Coordinator SmarterTools Inc. www.smartertools.com
0
Christophe Winzenried Replied
@Kyle thank you  -  

you won't believe it, but I still can't update from 16 to 17. After installing the new Build 7803 the conversion of the boxes works great. Unfortunately the web interface from v17 still doesn't work. I renamed the MRS directory before installing version 17. I also removed the domain in IIS and created it again using the tool. the MRS directory is configured to allow Full Control for NetworkService, and that SmarterMail application pool (in IIS) is configured to run as NetworkService.

This time the browser show then message "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.".

So I'm back to v16.
What did i miss?

Thanks for your time.

Microsoft Server 2016
.NET Framework-Version:4.0.30319; ASP.NET-Version:4.7.3770.0



4
echoDreamz Replied
BadImageFormat usually means you are running a 64bit library or executable on a 32bit machine or in a 32bit IIS application pool.  Make sure the app pool for the SM web interface isn’t set to use 32bit mode. 
0
Christophe Winzenried Replied
@echoDreamz  thank you  -    I wish it was so simple. recreating the IIS config during the installation didn't help either
1
echoDreamz Replied
The only other items associated with that exception is missing the required .net version. I'd make sure you have the latest .net 4.8 installation done as well as all the updates.
2
Christophe Winzenried Replied
thank you for your help. I installed the free version on an other, same 2016 server and everything works with ASP.NET-Version:4.7.3770.0 . I'll try again tonight to update my SM. thanks again for the support
0
Christophe Winzenried Replied
@echoDreamz  @Kyle  -  I've just tried everything and had zero success. WebMail on SM17 still returns Error 500.

Incidentally, a pool with 32bit true is always created during installation ...

It is also interesting that when the domains are converted, old entries (deleted 3 months ago) are searched for, but not new entries - where does the migration take this data from ?!
sorry, but some things don't work with this migration. i have been using SM since version 3 and it cannot be that this problem affects me as the only one.

So I'm back to version 16, which works. I pay the upgrade protection every year. I therefore assume that the update will work.
Sorry, but I'm a little disappointed now.
2
echoDreamz Replied
We've been using SM since 2/3 as well, we had no issues going from 16 to 17 as well as a few customer servers we manage.

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,

This error only means 1 thing that I am aware of, and that is loading a 64-bit component on a 32-bit machine or application pool (or vice versa).
0
Christophe Winzenried Replied
@echoDreamz   - I believe you and I am grateful for your help. I also called scripts to see in the browser whether the site is running in 64-bit mode. My Systems are Windows 2016 64-Bit on a x64Processor .NET Framework-Version:4.0.30319; ASP.NET-Version:4.7.3770.0 . In IIS the pool 32bit is on False and the pipeline mode is integrated. The ASP.Net 64bit ISAPI is activated.
I've run out of ideas for solutions.
0
Kyle Kerst Replied
Employee Post
The other possibility here is that there are issues with the Handler Mappings in IIS. Have you tried completing removing your IIS site and application pool, then letting the installer recreate it for you? Do you have other apps on this server that leverage IIS?
Kyle Kerst IT Coordinator SmarterTools Inc. www.smartertools.com
0
Christophe Winzenried Replied
@Kyle - thank you for your help
I tried a few times to recreate the IIS integration with the installation program and with the IisConfigurationTool. Otherwise I only have two ASP.Classic modules from Persits running, but they are 32bit.

I got with the script
<% @ Page Language = "cs" AutoEventWireup = "false" Debug = "true"%>
<%
     if (IntPtr.Size == 8) {
      Response.Write ("Running in 64-bit mode. Int size =" + IntPtr.Size.ToString ());
     } else {
      Response.Write ("Running in 32-bit mode. Int size =" + IntPtr.Size.ToString ());
     }
%>
checked whether this IIS can host ASP.Net in 64bit mode - with success and with a pool as specified by you.
0
Christophe Winzenried Replied
Marked As Resolution
A .NET monitoring showed that the Newtonsoft.Json file could not be found. But the file was there. So it could only be a faulty configuration. I was able to solve my problem by installing version 17 two times in a row. Not even now did the installer create a 64bit pool. But for this the Web.Config was finally properly initialized. As soon as the build 7817 is available again, the ClamAV error will be fixed.

Many thanks primarily to @echoDreamz and also to @Kyle for the support.

Reply to Thread