Web Configuration File (web.config)

Web.config is the default configuration file of an IIS site. It is an XML document that provides numerous configuration possibilities for a web application. Let's dive deeper into the required sections and settings related to MixERP application configuration.

No Viewstate

Yes, that's right, no more ViewState craziness!!!

<pages enableViewState="false" enableViewStateMac="false" enableEventValidation="false" />

No Dynamic ClientID

Turn off the magic "dynamic ClientIDs" that ASP.net produces.

<pages clientIDMode="Static" />

Configure IIS to Serve *.backup Files

MixERP creates database backups using custom pg_dump format with zlib compression library. Since IIS does not understand how to serve *.backup file extension, an administrator has to ensure that the backup files are properly being served as static contents.

Create a static file handler for *.backup file extension

<add name="StaticHandler" verb="*" path="*.backup" type="System.Web.StaticFileHandler" preCondition="integratedMode" />

Create a Mime Map for *.backup file extension

<mimeMap fileExtension=".backup" mimeType="application/octet-stream" />
This document assumes that your organization's policy allows downloading backups using a web browser software. If your organization does not allow backup files to be served via http(s), you may have to undertake extra steps to configure that, which is out of the scope of this document.

Register AttachmentFactory Upload Handlers and Services

AttachmentFactory exposes a couple of HTTP handlers and WebServices.

HTTP Handler


XML Web Service


Create Handlers

<add name="FileUploadHanlder" path="FileUploadHanlder.ashx" verb="*" type="MixERP.Net.WebControls.AttachmentFactory.FileUploadHanlder, MixERP.Net.WebControls.AttachmentFactory, Version=, Culture=neutral" />
<add name="FileUploadService" path="FileUploadHanlder.asmx" verb="*" type="MixERP.Net.WebControls.AttachmentFactory.Handlers.UploadService, MixERP.Net.WebControls.AttachmentFactory, Version=, Culture=neutral" preCondition="integratedMode" />

You need to instruct IIS to serve the above handlers on the paths you configured in AttachmentFactoryParameters, namely:

  • UploadHandlerUrl
  • UndoUploadServiceUrl

Configure AppSettings

The appSettings section is the one and only place that contains information about other configuration files.

<add key="SupressMissingResourceException" value="true" />
<add key="DisplayErrorDetails" value="false" />
<add key="MaxInvalidPasswordAttempts" value="10" />
<add key="ReportAPIConfigFileLocation" value="/Resource/Configs/ReportApiConfiguration.config" />
<add key="DbServerConfigFileLocation" value="/Resource/Configs/DbServer.config" />
<add key="PartyControlConfigFileLocation" value="/Resource/Configs/PartyControlParameters.config" />
<add key="TransactionChecklistConfigFileLocation" value="/Resource/Configs/TransactionChecklistParameters.config" />
<add key="ParameterConfigFileLocation" value="/Resource/Configs/Parameters.config" />
<add key="ReportConfigFileLocation" value="/Resource/Configs/ReportParameters.config" />
<add key="StockTransactionFactoryConfigFileLocation" value="/Resource/Configs/StockTransactionFactoryParameters.config" />
<add key="UpdaterConfigFileLocation" value="/Resource/Configs/Updater.config" />


Set this true if you want to supress "MissingManifestResourceException" when an i18n resource key is not found. Turn this on (true) on production site.


Set this to true if you do not want to display the complete exception stack trace to the application user. Turn this off (false) on production site.


Maximum number of invalid password attempts, after which no more sign in attempt will be allowed.

APIConfigFileLocation .. SwitchConfigFileLocation

The path of configuration files relative to web application root directory.

Related Topics

Share this page