If you are using standard WEB.CONFIG as supplied in GNPORTAL.ZIP, you have to place the APPSETTINGS.XML file two levels above the folder with WEB.CONFIG.
If you cannot find the APPSETTINGS.XML, download it from http://tech.teradp.com/tech/download/gnportal/rel6/appsettings.zip.
If your structure is drivename:\TERA\GN4\WEB\GNPORTAL
This is a recommended structure for all users that do NOT operate Tera Perforce server for source control.
Place APPSETTINGS.XML in C:\TERA\GN4.
If your structure is drivename:\TERA\GN4\MAIN\WEB\GNPORTAL
This is a recommended structure for all users that use Tera Perforce server for the source control.
Place APPSETTINGS.XML in C:\TERA\GN4\MAIN.
See also
Define server and database (APPSETTINGS.XML)