connectedbusiness / eshopconnected

Marketplace connectors for Connected Business
GNU Affero General Public License v3.0
0 stars 1 forks source link

A copy of the .config file is made in "C:\ProgramData\Connected Business" #27

Open davidonelson opened 6 years ago

davidonelson commented 6 years ago

Somehow a copy of Lerryn.WindowsService.eShopCONNECT.exe.config is made in "C:\ProgramData\Connected Business", and then used if found upon program startup. This means if you edit the file in the folder with the EXE, your edits may not be picked up when the program starts.

This was causing me issues when switching between the test and live databases. Transactions where going into the wrong databases. WASTED MUCH TIME.

Deleting the copy under "C:\ProgramData\Connected Business" fixes the issue.

This needs to be researched and fixed (or at least better understood).

davidonelson commented 6 years ago

Per CB ticket 601682, making a copy of the .config file in C:\ProgramData is the default functionality of CB, and eShopConnected is using the default connection logic.

From my viewpoint, this is not a good design for eShopConnected. It is error prone and confusing. There is no way to confirm which connection eShopConnected will use until after it has already started running and importing orders.

eShopConnected needs to be changed in one of the following manners:

Option 1: Always use the .config file in the folder with the EXE

Option 2: Check if the .config file in the folder with the EXE is newer than the one in C:\ProgramData, and if so, refresh the file in C:\ProgramData

Option 3: If the connect string on the .config file with the EXE does not match the one in C:\ProgramData, throw an error and stop running