How Can We Help?

Configure web.config to connect to a database

You are here:
< Back


Within the web folder you will find the file “web.config” – this is a XML file containing a number of settings which configure settings for the Enterprise Tester application, including what type of database to connect to and its connection string details.

By default this file is located:

c:\Program Files\Catch Limited\Enterprise Tester\Web\web.config

Open the file using notepad, within it you will need to change 4 settings:

  • “migration.providerName”
  • Default connection string
  • connection.driver_class
  • dialect

These are the default settings:


          <add key="migration.providerName" value="Migrator.Providers.SqlServer.SqlServer2005Dialect" />  

Default connection string

<add name="Default" connectionString="Data Source=.;Initial Catalog=EnterpriseTester;Integrated Security=True;MultipleActiveResultSets=true;" />


<add key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />


<add key="dialect" value="NHibernate.Dialect.MsSql2005Dialect" />

Following are the web.config values you will need for each type of database:

We provide example connection strings for each database, but each database supports a number of different connection options – we recommend consulting the website for listings of the different connection strings you can try.

SQL Server

By default the web.config file comes with the settings necessary to connect to Sql Server or Sql Server Express – all you need to do is provide a connection string.

Your options are:

  1. Use the provided database with user-attached connection string.
<add name="Default" connectionString="Data Source=.\SQLExpress;AttachDbFilename=c:\inetpub\wwwroot\EnterpriseTester\Data\EnterpriseTester.mdf;Initial Catalog=EnterpriseTester;Trusted_Connection=Yes;"/>

2. Connect to an existing database, using integrated security.

When using integrated security, the database will be connected to using the username configured as the identify for the application pool in IIS.

<add name="Default" connectionString="Data Source=.\SQLExpress;Initial Catalog=EnterpriseTester;Integrated Security=True;" />

3. Connect to an existing database, using a sql username & password.

<add name="Default" connectionString="Server=Server123;Database=EnterpriseTester;User ID=bob;Password=pass123;Trusted_Connection=False;" />


Change Enterprise Tester to use these values:

migration.providerName: “Migrator.Providers.PostgreSQL.PostgreSQL82Dialect”
connection.driver_class: “NHibernate.Driver.NpgsqlDriver”
dialect: “NHibernate.Dialect.PostgreSQL82Dialect”

And update the connection string to be like this:

<add name="Default" connectionString="Server=;Port=5432;Database=et-prod;User Id=postgres;Password=Password123;Timeout=60;CommandTimeout=120;" />


Change Enterprise Tester to use these values:

migration.providerName: “Migrator.Providers.Mysql.MysqlDialect”
connection.driver_class: “NHibernate.Driver.MySqlDataDriver”
dialect: “EnterpriseTester.Core.Dialects.MySqlDialectEx, EnterpriseTester.Core”

And update the connection string to be like this:

<add name="Default" connectionString="Server=;Database=et-prod;Uid=etuser;Pwd=password;" />

More examples of connection strings can be found here:

Table of Contents