Having created a new SQL database, you need to modify the
Web.config file so that the Cartella instance can connect
to the database. The following steps explain how to do this.
To connect to the new SQL Server database:
- Navigate to the Cartella site folder (e.g.,
[Site_Root]).
- Open the Web.config file with a text editor or IDE.
- Scroll to the
<connectionStrings>
node. - Above
<connectionStrings>
, find the commented area
containing examples of the three connection strings that need to be
configured: - Copy those connection strings to just below the
<clear>
node. <connectionStrings>
<clear/>
<add name="MSSQL2005"
connectionString="Data Source=SERVER/SQL_SERVER_INSTANCE_NAME;
Initial Catalog=NEW_DB_NAME;
User Id=CARTELLA_DB_USER_ACCOUNT;
Password=CARTELLA_DB_USER_PASSWORD;"
providerName="Cartella.Classes.MSSQLObjectProcedureEngine"/>
<add name="MSSQL2005_Asset"
connectionString="Data Source=SERVER/SQL_SERVER_INSTANCE_NAME;
Initial Catalog=NEW_DB_NAME;
User Id= CARTELLA_DB_USER_ACCOUNT;
Password=CARTELLA_DB_USER_PASSWORD;"
providerName="Cartella.MSSQLProcedures.MSSQLAssetProcedureCollection"/>
<add name="Elmah.Sql"
connectionString="Data Source=SERVER/SQL_SERVER_INSTANCE_NAME;
Initial Catalog=NEW_DB_NAME;
User Id=CARTELLA_DB_USER_ACCOUNT;
Password=CARTELLA_DB_USER_PASSWORD;"/>
</connectionStrings>
- Complete the following steps for each of the three connection strings.
- Edit
<SQL Server Location>
\<Database
instance>
to point to your SQL server location and SQL
instance. (The server name must resolve to the IP address that was used
to create your license key.) You may also enter an IP address instead of
a server name. - Enter the new database name as the
@Initial Catalog
assignment. That is, replace @New_DB_Name
with the name
of the new database. - Enter the user ID and password for the administrator, replacing
CARTELLA_DB_USER_ACCOUNT and
CARTELLA_DB_USER_PASSWORD, respectively.
Alternatively, the Windows credentials used by the
website's application pool can be added to SQL. In this case, there
would be no user name and password. Instead, add the attribute:
Integrated Security="true".
Example: - When you're finished modifying Web.config, save the file
and exit the editor.
Next Steps: After setting up the connection from Cartella to your SQL Server database, you can now log into your new instance of Cartella.