Bespoke Applications – Building your own website
3. Modifications to the web.config
- Add web.config to the root folder of the project
- Add the following to the web.config to register data providers.
Copy<system.data>
<DbProviderFactories>
<add name="Npgsql Data Provider" invariant="Npgsql" support="FF"
description=".Net Framework Data Provider for Postgresql Server"
type="Npgsql.NpgsqlFactory, Npgsql" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite"
description=".Net Framework Data Provider for SQLite"
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
</DbProviderFactories>
</system.data>
- Add connection string to web.config
Copy<connectionStrings>
<add name="ConfigurationDatabase"
connectionString="Data Source="
<path to db>\webMapLayersConfig.db""
providerName="System.Data.SQLite" />
</connectionStrings>
- Replace <path to db> with the correct path for the config database. This is usually C:\inetpub\wwwroot\WebMapLayers8\App_Data\webMapLayersConfig.db
- Add the following to appSettings
Copy<add key="Cadcorp.Web.UI.MapConfigConnector"
value="Cadcorp.Configuration.Connectors.SQLiteConfigConnector,
Cadcorp.Configuration" />
- Add to system.web
Copy<pages>
<controls>
<add tagPrefix="Cadcorp" namespace="Cadcorp.Web.UI.OpenLayers" assembly="Cadcorp.Web.UI" />
</controls>
</pages>
- Add required handlers by adding the following to the web.config
Copy<system.webServer>
<handlers>
<add name="javascripthandler" verb="GET" path="JavascriptHandler.axd" type="Cadcorp.Web.UI.OpenLayers.JavascriptHandler,Cadcorp.Web.UI" />
<add name="proxyhandler" verb="GET,POST,PATCH,DELETE" path="proxy.axd" type="Cadcorp.Web.Proxy.Proxy,Cadcorp.Web.Proxy" />
</handlers>
</system.webServer>
![]() |
4. Adding a map to Map.aspx |