srv4.exe reads the srv4.exe.config that is in the same folder as the executable file.
You have two choices:
•To define connection parameters in the srv4.exe.config.
•To point to an appsettings.xml file (recommended).
In the srv4.exe.config file you will find:
<configuration>
<appSettings file="..\appSettings.xml">
That tells to the srv4 to read the settings from the appsettings.xml located in its parent folder (ignoring those in the srv4.exe.config itself).
Now, this assumes certain folder structure, otherwise, the connection to the database will fail:
•If your GN4 system is in C:\TERA\GN4\BIN, and your Web server is in c:\tera\gn4\web, your appsettings.xml has to be in c:\tera\GN4 and the srv4 will connect to the database.
•If your GN4 system is in C:\TERA\GN4\MAIN\BIN, and your Web server is in c:\tera\gn4\MAIN\web, your appsettings.xml has to be in c:\tera\GN4\MAIN and the srv4 will connect to the database.
•If your GN4 system is in C:\TERA\GN4\MAIN\BIN, and your Web server is in c:\tera\gn4\web, the structure is substantially wrong, if your appsettings.xml is in c:\tera\GN4 as the srv4 will fail to connect to the database unless you update the <appSettings file="..\appSettings.xml"> to <appSettings file="..\..\appSettings.xml">.
If the setup is correct, but srv4 still cannot connect to the database, try to open both files with a XML editor (e.g. Visual Studio), and re-save them.