If you are writing a utility rather than a web app then your program needs app.config, not web.config. Below is an example of an app.config I wrote for a little utility I wrote in 2008. Some of the config settings in the galleryServerPro section have changed since then, so you'll need to update it to match the latest version in galleryserverpro.config, but it should get you on the right path.
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="galleryServerPro" type="GalleryServerPro.Configuration.GalleryServerProConfigSettings, GalleryServerPro.Configuration" allowDefinition="MachineToApplication" requirePermission="false"/>
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>
<connectionStrings>
<add name="SQLiteDbConnection" connectionString="Data Source=C:\Development\TIS.GSP\gsweb\App_Data\galleryserverpro_data.sqlite;Version=3;" />
<add name="SqlServerDbConnection" connectionString="server=YourServerName;Trusted_Connection=yes;database=GalleryServerPro;Application Name=Gallery Server Pro" />
</connectionStrings>
<cachingConfiguration defaultCacheManager="Cache Manager">
<cacheManagers>
<add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="Null Storage" name="Cache Manager" />
</cacheManagers>
<backingStores>
<add encryptionProviderName="" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching" name="Null Storage" />
</backingStores>
</cachingConfiguration>
<galleryServerPro>
<core galleryId="1" mediaObjectPath="C:\Development\TIS.GSP\gsweb\mediaobjects" websiteTitle="Gallery Server Pro"
pageHeaderText="My Media Gallery" pageHeaderTextUrl="~/" defaultAlbumDirectoryName="DefaultName"
defaultAlbumDirectoryNameLength="25" synchAlbumTitleAndDirectoryName="true"
emptyAlbumThumbnailBackgroundColor="#369" emptyAlbumThumbnailText="Empty"
emptyAlbumThumbnailFontName="Verdana" emptyAlbumThumbnailFontSize="13"
emptyAlbumThumbnailFontColor="White" emptyAlbumThumbnailWidthToHeightRatio="1.33"
maxAlbumThumbnailTitleDisplayLength="20" maxMediaObjectThumbnailTitleDisplayLength="16"
allowHtmlInTitlesAndCaptions="false" mediaObjectTransitionType="Fade"
mediaObjectTransitionDuration="0.2" slideshowInterval="4000"
mediaObjectDownloadBufferSize="32768" encryptMediaObjectUrlOnClient="true"
encryptionKey="Eig-t/1oF2lzs}BDGw74R-Ti" allowUnspecifiedMimeTypes="false"
imageTypesStandardBrowsersCanDisplay=".jpg,.jpeg,.gif,.png" allowAnonymousHiResViewing="true"
enableImageMetadata="true" enableWpfMetadataExtraction="true"
enableMediaObjectDownload="true" enablePermalink="true" enableSlideShow="true"
maxThumbnailLength="115" thumbnailImageJpegQuality="70" thumbnailClickShowsOriginal="false"
thumbnailWidthBuffer="30" thumbnailHeightBuffer="65" thumbnailFileNamePrefix="zThumb_"
thumbnailPath="C:\Development\TIS.GSP\gsweb\mediaobjects" maxOptimizedLength="640" optimizedImageJpegQuality="70"
optimizedImageTriggerSizeKB="50" optimizedFileNamePrefix="zOpt_"
optimizedPath="C:\Development\TIS.GSP\gsweb\mediaobjects" originalImageJpegQuality="95" applyWatermark="false"
applyWatermarkToThumbnails="false" watermarkText="Copyright 2008, Your Company Name, All Rights Reserved"
watermarkTextFontName="Verdana" watermarkTextFontSize="13" watermarkTextWidthPercent="50"
watermarkTextColor="White" watermarkTextOpacityPercent="35" watermarkTextLocation="BottomCenter"
watermarkImagePath="images/gsplogo.png" watermarkImageWidthPercent="85"
watermarkImageOpacityPercent="25" watermarkImageLocation="MiddleCenter"
sendEmailOnError="false" emailFromName="Gallery Server Pro" emailFromAddress="webmaster@yourisp.com"
emailToName="Gallery Server Pro Administrator" emailToAddress="name@yourisp.com"
smtpServer="" smtpServerPort="" autoStartMediaObject="false"
defaultVideoPlayerWidth="640" defaultVideoPlayerHeight="480"
defaultAudioPlayerWidth="600" defaultAudioPlayerHeight="60" defaultGenericObjectWidth="640"
defaultGenericObjectHeight="480" maxUploadSize="2097151" allowAddLocalContent="true"
allowAddExternalContent="true" productKey="" />
<galleryObject>
<mediaObjects>
<mediaObject mimeType="image/*">
<browsers>
<browser id="default" htmlOutput="<div class="op1"><div class="op2"><div class="sb"><div class="ib"><img id="mo_img" src="{MediaObjectUrl}" class="{CssClass}" alt="{TitleNoHtml}" title="{TitleNoHtml}" style="height:{Height}px;width:{Width}px;" /></div></div></div></div>" />
</browsers>
</mediaObject>
... rest of mediaObject tags skipped for brevity...
</mediaObjects>
<mimeTypes>
<mimeType fileExtension=".afl" browserId="default" type="video/animaflex"
allowAddToGallery="false" />
... rest of mimeType tags skipped for brevity...
<mimeType fileExtension=".zip" browserId="default" type="application/application/x-zip-compressed"
allowAddToGallery="false" />
</mimeTypes>
</galleryObject>
<dataStore albumTitleLength="200" albumDirectoryNameLength="255"
albumSummaryLength="1500" mediaObjectTitleLength="1000" mediaObjectFileNameLength="255"
mediaObjectHashKeyLength="47" mediaObjectExternalHtmlSourceLength="1000"
mediaObjectExternalTypeLength="15" mediaObjectMetadataDescriptionLength="100"
mediaObjectMetadataValueLength="2000" roleNameLength="256" ownedByLength="256"
createdByLength="256" lastModifiedByLength="256" />
<dataProvider defaultProvider="SqlServerGalleryServerProProvider">
<providers>
<add applicationName="Gallery Server Pro" connectionStringName="SQLiteDbConnection"
name="SQLiteGalleryServerProProvider" type="GalleryServerPro.Data.SQLite.SQLiteGalleryServerProProvider, GalleryServerPro.Data.SQLite" />
<add applicationName="Gallery Server Pro" connectionStringName="SqlServerDbConnection"
name="SqlServerGalleryServerProProvider" type="GalleryServerPro.Data.SqlServer.SqlDataProvider, GalleryServerPro.Data.SqlServer" />
</providers>
</dataProvider>
</galleryServerPro>
</configuration>
Roger Martin
Creator and Lead Developer of Gallery Server Pro