Overview
You get a "Server Error in '/MailEssentials' Application. Compilation Error" when you are trying to create a new custom report in the Reporting section of the configuration UI. The existing reports are accessible.
The details of the error are:
Compiler error message: CS0433: The type 'DevExpress.XtraReports.Web.Report toolbar button' exists in both
'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\mailessentials\0148de84\5db9b3c6\assembly\dl3\ef31f07d\00cc8274_0007d301\DevExpress.XtraReports.v11.2. Web. DLL' and
'C:\Windows\Microsoft.NET\Framework64\v4.0.30319 Temporary ASP.NET Files\mailessentials\0148de84\5db9b3c6\assembly\dl3\e3a9f8d0\003a0fbf_f272cc01\DevExpress.XtraReports.v11.1. Web. DLL'
Solution
The root cause of this issue is that .NET does not allow referencing assemblies with the same name but different versions in one project. When you try to open the page, the framework tries to load older assemblies, which have already been replaced with new ones.
In order to solve this issue, please follow the steps below:
- Stop the GFI MailEssentials services.
- Stop IIS:
- From the Start menu, click Run.
- In the Open box, type cmd, and click OK.
- At the command prompt, type
iisreset /stop
- IIS attempts to stop all services:
- Delete the
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\MailEssentials
folder. - Check the MailEssentials folder for instances of the old assemblies. If found in the locations below, please remove all
DevExpress.XtraReportsv11.1
items present:..\GFI\MailEssentials\wwwconf\App_GlobalResources
..\GFI\MailEssentials\wwwconf\bin
- Open the MailEssentials Switchboard and:
- Switch to Local Mode.
- Switch back to IIS Mode.
- This will re-create the Configuration site and ensure that the C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\MailEssentials folder will be re-created.
- Navigate to
..\GFI\MailEssentials\Attendant\data
. If thelogs.fdb
file is missing, re-create it by navigating to..\GFI\MailEssentials\Attendant\bin
and running theLogsFDBCreator.exe
file. - Ensure correct permission to the
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\MailEssentials
folder- Right-click the folder mentioned above and select Properties. Click the Security tab.
- Add the Network Service account with full control and allow the permissions to propagate.
- Restart IIS:
- From the Start menu, click Run.
- In the Open box, type cmd, and click OK.
- At the command prompt, type
iisreset /noforce
- IIS restarts:
- Restart the GFI MailEssentials services that you previously stopped.
Testing
After applying the steps above, you should be able to create custom reports.
If the issue still persists, please generate the troubleshooting logs as follows:
- Make sure that you have tracing enabled.
- Wait for at least 30 minutes to gather enough information and for the issue to be reproduced.
- Run the troubleshooter:
- Start > Programs > GFI MailEssentials > Troubleshooter
- Follow the Log Generation Wizard for collecting the required and pertinent information.
- Select New Case when completing the log generation to attach the logs to a new case that will be automatically created, or open a support ticket manually and attach the logs to that ticket, so that the Support team can investigate the problem.