appSettings Element

The <appSettings> element holds a variety of key-value pairs for various settings, including the database and SMTP email server connections.

Key

Description

DatabaseX

Database connection strings hold the information related to the databases connected to the application.

Parameter

Description

Provider

Set to Microsoft.Jet.OLEDB.4.0 for Microsoft Access.

Unspecified (and not used) for other databases.

Data Source

Microsoft Access

The path to the database file (.MDB).

Microsoft SQL Server

The name or network address of the instance of Microsoft SQL Server to which to connect.

MySQL

The server/host where MySQL is running.

Oracle

The Oracle instance name.

Database

Microsoft Access

The name of the database.

Microsoft SQL Server

The name of the database.

MySQL

The name of the database.

Oracle

The Oracle schema name.

Note: the Database element in an Oracle connection string is used by Iron Speed Designer at design-time.  At run time, the Database element is not used by generated applications.

Trusted_Connection

true
yes

The current Windows account credentials are used for authentication.

false
no

User ID and Password are specified in the connection.

Password

Microsoft Access

The password setup in the database or "" for no password.

Microsoft SQL Server

The password for the Microsoft SQL Server account logging on.  (Not recommended.  To maintain a high level of security, it is strongly recommended that you use the Trusted_Connection keyword instead.)

MySQL

The MySQL password.

Oracle

The Oracle password.

Port

For MySQL, the TCP port number where MySQL listens on the server.

User ID

Microsoft Access

The user ID identified in the database, or the default 'Admin' username.

Microsoft SQL Server

The Microsoft SQL Server login account.  (Not recommended.  To maintain a high level of security, it is strongly recommended that you use the Trusted_Connection keyword instead.)

MySQL

The MySQL user ID.

Oracle

The Oracle user ID.

Jet OLEDB:System Database

Microsoft Access only.  Used for opening a system database that uses Access Workgroup Information security specified in an .MDW file.

Jet OLEDB:Database Password

Microsoft Access only.  Used for opening a password-protected database.

Jet OLEDB:Database Locking Mode

Microsoft Access only.  Specifies the mode used when locking the database to read or modify records.

0

Page-level locking

1

Row-level locking

Note   A database can only be open in one mode at a time. The first user to open the database determines the locking mode to be used while the database is open.

Mode

Microsoft Access only.  Specifies database access permissions.

Read
Write
Share Deny None
Share Deny Read
Share Deny Write
Share Exclusive
Write

Example: Microsoft SQL Server database connection

<configuration>

     <appSettings>

          <add key=”DatabaseNorthwind1” value=”

              Data Source=(local);

              Database=Northwind;

              Trusted_Connection=yes;

              User ID=;

              password= ” />

     </appSettings>

</configuration>

Example: Microsoft Access database connection

     <appSettings>

          <add key=”DatabaseNorthwind1” value=”

              "Provider=Microsoft.Jet.OLEDB.4.0;
              Data Source=C:\IronSpeed\TestAccessDB\TestTypes.mdb;
              Jet OLEDB:Database Locking Mode=1;
              Mode=Share Deny None" />

     </appSettings>

DefaultPageUrl

DefaultPageUrl is required in order to establish the default page of the application.  You may edit this setting to change the default page.  The initial setting is created by Iron Speed Designer.

Usage:

<configuration>

     <appSettings>

          <add key=” DefaultPageUrl”
              value="Employees/ShowEmployeesTable.aspx” />

     </appSettings>

</configuration>

EmailFrom

The EmailServer and EmailFrom parameters are used for (1) email notifications when importing data, (2) password reminders sent to application users, and (3) workflow state change notification alerts.

Usage:

<configuration>

     <appSettings>

          <add key=”EmailFrom” value=”email address” />

     </appSettings>

</configuration>

Example:

<configuration>

     <appSettings>

          <add key=”EmailFrom” value=user@ironspeed.com />

     </appSettings>

</configuration>

EmailServer

The EmailServer and EmailFrom parameters are used for (1) email notifications when importing data, (2) password reminders sent to application users, and (3) workflow state change notification alerts.

Usage:

<configuration>

     <appSettings>

          <add key=”EmailServer” value=”SMTP server name” />

     </appSettings>

</configuration>

Example:

<configuration>

     <appSettings>

          <add key=”EmailServer” value=”mail.mycompany.com” />

     </appSettings>

</configuration>

ErrorPageUrl

Sets the page that is displayed when the application flags an error.  This setting is not required, and if not present in the Web.config file, a default will be assumed.  You may add/edit these settings to change the locations of the various pages.

Usage:

<configuration>

     <appSettings>

         <add key=” ErrorPageUrl” value="Shared/Error_Page.aspx” />

     </appSettings>

</configuration>

ForbiddenPageUrl

Sets the page that is displayed when the application user attempts to access a page for which they do not have sufficient permission to access.  This setting is not required, and if not present in the Web.config file, a default will be assumed.  You may add/edit these settings to change the locations of the various pages.

Usage:

<configuration>

     <appSettings>

         <add key=”ForbiddenPageUrl”  value="Shared/Forbidden_Page.aspx” />

     </appSettings>

</configuration>

LogCommitExceptions

If the value of this property is "all" then all database commit exceptions will be logged to the system event log (Event Viewer) as warnings.  Normally, commit exceptions are not logged because they are expected to occur in the course of normal application-user actions, and logging them in a production environment could be undesirable.  However, it is useful in a development/testing environment to have a full log of the detailed exception data for all commit failures.

Note: Only works if LogEvents = "true".

Usage:

<configuration>

     <appSettings>

          <add key=”LogCommitExceptions” value=”all” />

     </appSettings>

</configuration>

LogDatabaseCommands

Set LogDatabaseCommands value="true" to log all database SQL commands to the system the event log.  The default value is "false" which means not to log database SQL commands.

Note:  Only works if LogEvents = "true".

LogDatabaseExceptions

If the value of this property is "all" then all database (i.e. SQL) exceptions will be logged to the Event Viewer as warnings.  Normally, most database exceptions are not logged because they are expected to occur in the course of normal application-user actions, and logging them in a production environment could be undesirable.  However, it is useful in a development/testing environment to have a full log of the detailed exception data for all database exceptions.

Note:  Only works if LogEvents = "true".

Usage:

<configuration>

     <appSettings>

          <add key=”LogDatabaseExceptions” value=”all” />

     </appSettings>

</configuration>

LogEvents

Set LogEvents value="false" to disable all logging to the system the event log.

The default value is "true".

PrecompilePageFiles

Normally, a thread is started at the end of the generation process that asynchronously accesses the application’s pages so that IIS will compile the ASPX and ASCX files.

true

The compilation thread is started.  This is the default value.

false

The compilation thread is not started.  This can be useful in a development environment, since the thread can consume most of the server's CPU cycles for many minutes.

SignedOutPageUrl

Sets the page that is displayed when the application signs out of the application.  This setting is not required, and if not present in the Web.config file, a default will be assumed.  You may add/edit these settings to change the locations of the various pages.

Usage:

<configuration>

     <appSettings>

         <add key=”SignedOutPageUrl”  value="Shared/SignedOutPage.aspx” />

     </appSettings>

</configuration>

SignInPageUrl

Sets the page that is displayed when the application user is prompted to sign in to the application.  This setting is not required, and if not present in the Web.config file, a default will be assumed.  You may add/edit these settings to change the locations of the various pages.

Usage:

<configuration>

     <appSettings>

         <add key=” SignInPageUrl” value="Shared/Sign_in_Page.aspx” />

     </appSettings>

</configuration>

TraceDataAccessMethods
TraceDatabaseCommands
TraceTransactionCache

To get detailed page-level tracing, set these keys to "true".

WebServer

The WebServer parameter instructs Iron Speed Designer to redirect from http (non-secure mode) to https (secure mode).  It is also used for workflow state email notifications to set the application’s URL, e.g., “Click here to access…”

Usage:

<configuration>

     <appSettings>

          <add key=”WebServer” value=”base URL of web server” />

     </appSettings>

</configuration>

Examples:

<configuration>

     <appSettings>

          <add key=”WebServer” value=”http://machinename” />

     </appSettings>

</configuration>

 

<configuration>

     <appSettings>

          <add key=”WebServer” value=”http://www.mycompany.com” />

     </appSettings>

</configuration>

 

<configuration>

     <appSettings>

          <add key=”WebServer” value=”http://202.168.17.26” />

     </appSettings>

</configuration>

To specify a different server/host name or to include a port number, you may change this to:

<add key="WebServer" value="http://yourServerName:yourPortNumber" />

You may also change "http://" to "https://" if secure http is required for your application.  If the value does not start with either "http://" or "https:// it is ignored and the default prefix http://localhost is used.

See Also

Web.config Configuration File