Understanding the InstantForum.NET Web.config file

Expand / Collapse
 

Understanding the InstantForum.NET Web.config file


The Web.config file within the installation directory contains key application settings that may require updating before a v4.0 installation will function. The Web.Config file can be modified using any standard ASCII editor such as NotePad. Do NOT edit the web.config file with a WYSIWYG editor such as MS Word™. An overview of each key Web.Config element is provided below.

Application Settings

The <appSettings> element of the web.config file is used to stored key application settings. The database connection string application setting is dependent upon the environment, for instance, this will change as you move your forum from a testing and staging server into production.

<appSettings>	

<!-- The data provider to use for the application. -->
<!-- Providers include SqlClient, OLEDB, ODBC, Oracle, Currently only SqlClient is supported. -->
<add key="InstantASP_DataProvider" value="SqlClient"/>
	
<!-- VERY IMPORTANT! The connection string to the data provider -->
<!-- Please refer to "Step 4 : Editing The Web.Config" section of the user guide for more information -->
<add key="InstantASP_ConnectionString" value="server=localhost; Trusted_Connection=true; 
database=InstantForumLive2;"
/> <!-- The name of the owner for database objects --> <add key="InstantASP_DatabaseOwner" value="dbo"/> <!-- Virtual path to location of the XML based configuation file defining file and folder names --> <add key="InstantASP_PageData" value="Pages.config"/> <!-- Interval in milliseconds to poll the InstantASP_Sessions table and remove any expired data --> <!-- Example 300000 milliseconds polls the InstantASP_Sessions table every 5 mins and removes expired session data --> <!-- The default value is to poll for expired data every 1 minute i.e. every 60000 milliseconds --> <add key="InstantASP_SessionCleanUpInterval" value="60000"/> <!-- Interval in milliseconds to poll the InstantASP_Emails table and send any queued emails --> <!-- Example 300000 milliseconds polls the InstantASP_Emails table every 5 mins to send queued emails --> <!-- The default value is to poll for emails every 1 minutes i.e. every 60000 milliseconds --> <add key="InstantASP_EmailInterval" value="60000"/> <!-- Determines which is method is used within the application to log any exceptions that may occur --> <!-- Possible event log options are: ToFile, ToEventLog Or ToEmail. To disable use None. --> <!-- If you choose ToFile exceptions will be written to Exceptions.config within the installation root --> <add key="InstantASP_ExceptionLogMethod" value="ToEmail"/> <!-- Determines which email address is used to send exception notifications to if the above --> <!-- InstantASP_ExceptionLogMethod setting is set to ToEmail. --> <add key="InstantASP_ExceptionEmailAddress" value="errors@yourdomain.com"/> <!-- Period in seconds allowed for queries before they timeout, if your performing a large --> <!-- job such as deleting a forum containing thousands of posts and your receiving timeout --> <!-- exception errors this value may need to be increased to allow the query to complete --> <add key="InstantASP_CommandTimeout" value="120"/> <!-- Interval in milliseconds to poll the built in tasks such as deleting temporary attachments, --> <!-- deleting search results and deleting read forum and topic information, the custom scheduled tasks --> <!-- within the InstantASP_ScheduledTasks table are also polled at this interval --> <add key="InstantASP_TaskInterval" value="60000"/> <!-- If you install InstantForum.NET within a sub-folder of a IIS web application you will --> <!-- need to provide the full virtual path from the root of your web application to the --> <!-- forum installation below, For example if you install the forum to a web application --> <!-- located at c:\test\ but you wanted to add the forum to c:\test\forums\myforum\--> <!-- you would modify the setting below to read "forums/myforum" This indicates the --> <!-- virtual path from the web application root, if you don't install the forum to the --> <!-- root of a web application please ensure you move the bin directory and this web.config --> <!-- to your web applications root directory, typically you can leave this blank, it is only --> <!-- required if you don't install InstantForum.NET within the root of a IIS web application --> <add key="InstantASP_VirtualPath" value=""/> </appSettings>
HTTP Modules

The <httpModules> element of the web.config file configures the shared and forum specific HTTP modules. The HTTP modules defined all provide services like authentication and authorization, task management, email polling, exception handling and more. These modules are very important in order for InstantForum.NET to operate correctly. These should always be included within the web.config like so...

<system.web>
<!-- VERY IMPORTANT! Required HttpModules --> <!-- These must be included in your web.config for the application to function correctly. -->
<httpModules>
<!-- HttpModule used to manage user authentication --> <add type="InstantASP.Common.HttpModule.SecurityModule, InstantASP.Common" name="SecurityModule"/>
<!-- HttpModule used to perform dynamic URL rewriting --> <add type="InstantASP.Common.HttpModule.RewriterModule, InstantASP.Common" name="RewriterModule"/>
<!-- HttpModule used to manage general tasks within all InstantASP applications --> <add type="InstantASP.Common.HttpModule.ServiceModule, InstantASP.Common" name="ServiceModule"/>
<!-- HttpModule used to manage application generated emails --> <add type="InstantASP.Common.HttpModule.EmailModule, InstantASP.Common" name="EmailModule"/>
<!-- HttpModule used to monitor and handle any application exceptions --> <add type="InstantASP.Common.HttpModule.ExceptionModule, InstantASP.Common" name="ExceptionModule"/>
<!-- HttpModule used to manage scheduled tasks specific to InstantForum.NET --> <add type="InstantASP.InstantForum.HttpModule.ForumModule, InstantASP.InstantForum" name="ForumModule"/>
</httpModules>
</system.web>


Rate this Doc:
     

Add Your Comments


Name: *
Email Address:
Web Address:
   
  
 
 
   
Verification Code:
*
 

Details
Category: Configuration Files
Product: InstantForum.NET
Version: 4.1
Type: INFO
Level: Intermediate
Rated 4 stars based on 3 votes.
Article has been viewed 2,161 times.
Last Modified By: Ryan Healey
Last Modified:24th April 2009
Options

Home | Products | Purchase | Services | Support | Company | Contact Us
Privacy Statement | © 1999-2009 InstantASP Limited. All Rights Reserved.