The type initializer for ‘wg.eCC.Data.DataFactory.ConnectionFactory’ threw an exception
This error usually occurs when Webgility Software is not able to read the Apiconfig file. There can be multiple scenarios, mentioned below are a few:
1). Apiconfig file is blank: This usually happens due to a Windows update. If you have multiple machines running Webgility Software you can borrow a copy of the Apiconfig file from another machine (where the Webgility application is running fine) and replace it on the machine facing the issue. You can find and copy the Apiconfig file under the location C:\Webgility\UnifyEnterprise\XML, replace it on the missing machine, and then restart the Webgility Software, it should work fine.
If you only have one Webgility computer, you will need to reinstall the Webgility Software and it will place the Apiconfig file but it will not have your database instance information in it so when logging back into Webgility it will ask you to connect to an existing SQL Server instance and then you will need to select the SQL Server instance which is hosting your Webgility Database. If this is the case then proceed further and use SQL Server Authentication (Username lower case: sa and Password case sensitive: Webgility2011 ) and try to connect. This should allow you to login back successfully.
2). Incorrect Syntax: Another scenario is if a syntax on any of the existing nodes in the Apiconfig file is incorrect (means if a bracket is missing or there are extra characters) due to this Webgility Software is not able to read the Apiconfig file properly and will give you the same above-mentioned error. You will need to verify and correct all the syntaxes on all the nodes and properly save the file. Once done then restart the Webgility and it should allow you to log in again.
Special Case: If Webgility Software is hosted on RightNetworks and facing this issue - Then please Log Off properly from your RightNetworks account (DO NOT X OUT) and wait for a couple of minutes, then login back in. If the issue still persists then you will need to contact RightNetworks Support and they will assist you further.
Please feel free to contact us if you have any questions.