Overview
When you are installing Patch 1 from MailEssentials 21.7, the below error is seen in the logs:
2023-07-27,15:11:45,833,1,"#00002354","#00000003","error ","GFIPatchExecuter",
"Error: Start Patching - System.InvalidOperationException: Duplicate attribute.;
at System.Xml.Linq.XElement.AddAttributeSkipNotify(XAttribute a);
at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content);
at System.Xml.Linq.XContainer.Add(Object content);
at GFIPatchExecuter.Classes.Core.XMLCommand.XMLChangePatch(XMLChange xmlChange);
at GFIPatchExecuter.Forms.frmPatch.StartPatching()"
This error implies the patch was already installed and can’t reinstall. This could be due to the patches folder being cleaned or an XML reset to get patches anew.
Solution
The error shows the operation had already been completed previously to add the attribute and cannot add a duplicate, while the subsequent patch operations weren’t attempted. It is safe to assume that the patch was already installed. However, this patch can't be reinstalled in this state. Below are available solutions:
- Set Patch 1 as already installed - With the MailEssentials services running do the following:
- Open
C:\Program Files (x86)\GFI\MailEssentials\Patches\PatchStatus.xml
with any text editor. - Change
<Status>Failed</Status>
to<Status>Installed</Status>
. - Save the file.
- Refresh WebUI in the browser to confirm that Patch 1 shows as installed and Patch 2 is available for installation.
- Open
- Undo the first operation of Patch 1 and then install again - With the MailEssentials services running do the following:
-
Open
..\GFI\MailEssentials\wwwconf\web.config
, under\configuration\system.web\authentication\forms
with any editor -
Replace the
<forms>
tag with<forms name=".ME" loginUrl="pages/Login.aspx" protection="All" path="/" timeout="30" />
(should be line 113). -
Save the file.
-
Refresh WebUI in the browser and reinstall Patch 1.
-
- In case neither of the above work, the fallback solution is to reinstall and retain data with settings:
- Uninstall MailEssentials.
- Reboot the machine (optional, but recommended).
- Install MailEssentials 21.7 under the same path.
After this, MailEssentials Patch 2 and 3 can be installed without any changes.