How to Fix CRM Email Router Could Not Start Issue

Adam Murchison, 16 November 2017

Was your CRM Email Router running smoothly as expected and suddenly the CRM Email Router Service stopped running? Were you greeted with an error similar to the one below in the event viewer of your server? 

“#16192 - The E-mail Router service could not run the service main background thread. The E-mail Router service cannot continue and will now shut down. System.Configuration.ConfigurationErrorsException: System information was not specified in the E-mail Router service configuration file. The E-mail Router service cannot continue and will now shut down. ---> System.Xml.XmlException: Root element is missing.
    at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
    at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
    at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
    at System.Xml.XmlDocument.Load(XmlReader reader)
    at System.Xml.XmlDocument.Load(String filename)
    at Microsoft.Crm.Tools.Email.Providers.ConfigFileReader..ctor(String filePath, ServiceLogger serviceLogger)
    at Microsoft.Crm.Tools.Email.Providers.SystemConfiguration.Initialize(ServiceLogger serviceLogger)
    at Microsoft.Crm.Tools.Email.Agent.ServiceCore.InitializeSystemConfiguration()
    --- End of inner exception stack trace ---
    at Microsoft.Crm.Tools.Email.Agent.ServiceCore.InitializeSystemConfiguration()
    at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteService()”

This recently happened to a client of ours and I can imagine it has happened to more than one person. This issue is caused due to a windows update (potentially automatic update) and corrupts one or two files in the Service folder of the CRM Email Router.

The fix is relatively simple, first off, if the Email Router is on a dedicated PC (i.e. not the CRM server), I would try restart the PC that the service is running on and then try re-running the service.

If this does not work then simply navigate to the Email Router Service folder: C:\Program Files\Microsoft CRM Email\Service. This folder is defaulted to be hidden, so you will need to show hidden folders.

Take a backup of the Microsoft.Crm.Tools.EmailAgent.SystemState.Xml and Microsoft.Crm.Tools.EmailAgent.xml, then delete both original files. Then go to the control panel -> Programmes and Features and find the CRM Email Router.

Right click the Email Router programme, then click Uninstall/Change and a wizard will pop up, press the repair option. Run the Repair and then try restart your service. Voila, your email service is back up and running.