Skip to main content

Web.Config Configuration

The web.config file, in the main Web Portal directory, contains all of your core configuration settings. Many of the settings get configured when you run the installer. Others get configured after installing or as needed. These settings allow you to configure file paths, LDAP/LDAPS, Multi-Factor Authentication (MFA), SMTP and other interface tweaks. 

Let's take are look at the settings, broken down by virtual groups...

The first set of settings are the base file location settings. This tells Web Portal where to find various required files. These paths are set based on where Web Portal is installed, as well as, where the various Report Runner Windows applications were installed. In general, these file location settings should never be modified manually.

<add key="WebPortalDictionary" value="C:\Inetpub\wwwroot\ReportRunnerWebPortal\JNAdmin\WebPortalDictionary.xml"/>
<add key="InputDirectory" value="C:\Users\Public\Documents\Jeff-Net\Report Runner Batch\AppData\Event Server\Input\"/>
<add key="OutputDirectory" value="C:\Users\Public\Documents\Jeff-Net\Report Runner Batch\AppData\Event Server\Processed\"/>
<add key="ErrorDirectory" value="C:\Users\Public\Documents\Jeff-Net\Report Runner Batch\AppData\Event Server\Error\"/>
<add key="TemplateDirectory" value="C:\Users\Public\Documents\Jeff-Net\Report Runner Batch\AppData\Event Server\WebTemplates\"/>
<add key="ReportDirectory" value="C:\Inetpub\wwwroot\ReportRunnerWebPortal\ReportDirectory\"/>
<add key="DatasetDirectory" value="C:\Inetpub\wwwroot\ReportRunnerWebPortal\JNAdmin\"/>
<add key="PicklistDirectory" value="C:\Inetpub\wwwroot\ReportRunnerWebPortal\PickListDirectory\"/>
<add key="ExportFormatOptions" value="C:\Inetpub\wwwroot\ReportRunnerWebPortal\ExportFormatOptions\list.txt"/>
<add key="StaticReportDirectory" value="~/StaticReportDirectory"/>
<add key="NewRptFilesDirectory" value="~/NewRPTFilesDirectory"/>
<add key="PickCssFiles" value="C:\Inetpub\wwwroot\ReportRunnerWebPortal\App_Themes\" />
<add key="InstanceReportDirectory" value="~/InstanceReportDirectory" />
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />

The next setting is for configuring the command line URL for Web Portal. For example, if you have configured a domain for Web Portal like https://reports.yourcompanyname.com, you would change the http://999.999.999.9 to that URL. 

<!-- Command Line Web Portal URL with Result.aspx appended         -->
<add key="WebPortalUrl" value="http://999.999.999.9/ReportRunnerWebPortal/Result.aspx"/>

By default, passwords are not shown in the browse users interface. This setting can enable it (set to 1).

<!-- Enable display of password in browse lists                    -->
<add key="ShowPasswordInBrowseList" value="0" />

For those administrators that do not want to manually create their own groups and users, you can configure Web Portal to utilize your company's Active Directory configuration via LDAPS or LDAP.

Both LDAPS and LDAP are enabled with the setting below (then, based on the rest of the settings, Web Portal uses which ever one is configured).

Note, both groups of settings prompt for an (administrator) user name and password. This is so ALL groups can be fetched for the Administrator interface and assigned to various reports.

<!-- Enable LDAPS/LDAP Active Directory Usage -->
<add key="UsesADForGroupsAndUsers" value="0" />

 <!-- LDAPS Settings Only -->
 <add key="LDAPS_Server" value="whatever.ldap.knownkeep.net" />
<add key="LDAPS_BaseDN" value="DC=ldap,DC=knownkeep,DC=net" />
<add key="LDAPS_Port" value="636" />
<add key="LDAPS_UserName" value="administrator@ldap.knownkeep.net" />
<add key="LDAPS_Password" value="" />
<add key="LDAPS_UPN_Domain" value="ldap.knownkeep.net" />

<!-- LDAP Settings Only - Primary LDAP #1 (1-5) -->
<add key="ADDomainPath" value="LDAP://localhost/" />
<add key="ADUserName" value=""/>
<add key="ADPassword" value=""/>
<add key="ADGroupFilter" value="" />

Reports can be configured to save copies of their previous runs (so someone else can view a previously run report if live/latest data is not necessary). These previous runs are called Instances. Instances get a date and time stamp appended to them. You can configure that here (most administrators leaves this setting as-is). 

<!-- Default Date-Stamping Appended Onto Instances                 -->
<add key="InstanceNamingFormat" value="- jn_dayofweek - jn_thismonth jn_DD - jn_thisyear at jn_HH-jn_MM2-jn_SS" />

Here you can configure the parameter date format.

<!-- yy=year, mm=month, dd=day                                     -->
<!-- Examples: yymmdd, ddmmyy, dd/mm/yy, yy-mm-dd                  -->
<add key="DateFormat" value="mm/dd/yy" />

If you ever want to deploy a version of Web Portal which does NOT allow running of live reports, and you ONLY want to post LINKS or STATIC reports, just set the setting to 1.

<!-- Enable Static Reports Only (Share Portal)                     -->
<add key="StaticReportsOnly" value="0" />

SMTP settings are prompted for during the install process. They are stored here. If you need to change them later, you can do so here. These SMTP settings are used to email end users password reset emails and MFA token/code emails. 

<!-- SMTP Information (for emailing password confirmation and MFA only)    -->
<add key="SMTPServer" value="mail.reportrunner.com"/>
<add key="SMTPServerLogin" value="webportal@reportrunner.com"/>
<add key="SMTPServerPassword" value="WebPortal"/>
<add key="SMTPServerPort" value="587" />
<add key="SMTPServerEnableSSL" value="1" />
<add key="SMTPServerFromName" value="Web Portal" />

The end user Web Portal interface shows your company name. You set that here.

<!-- Company Information                                           -->
<add key="CompanyName" value="Web Portal Company"/>

By default, when reports are run (via the Report Runner Batch engine), they utilize the Global ID/password configuration from Report Runner Batch or the specified ID/password in the job edit window to access the database (run the report and connect to the database).

If you want to OVERRIDE these settings globally, and use the ID/password used to log into Web Portal itself for database access, set the setting below to 1.

<!-- Use WP Login For DB Login To Run Reports Setting 1:On 0:Off   -->
<add key="UseWPLoginForDatabaseLogin" value="0" />

If you want to configure a basic password to access the Administrator interface of Web Portal, you can do so here. You can also lock it down manually with IIS/Windows directory authentication.

<!-- Optionally set an administrator password                      -->
<add key="AdminPassword" value=""/>
<add key="LastAdminLogin" value=""/>
<add key="LastAdminLoginTimeout" value="30"/>

By default, Web Portal file names are random (to ensure users don't duplicate output file names when viewing online). With the settings below, you can configure how output files are named if it's an urgent need (like generating invoice reprints). You can configure it so your parameter values are used as part of the output file names. We recommend only turning this feature on if it's 100% necessary.

<!-- Modify File Names With Parameter Values Setting 1:On 0:Off    -->
<add key="DefaultFileNameAddParametersEnabled" value="0"/>
<add key="DefaultFileNameAddParametersSeparator" value="-"/>
<add key="DefaultFileNameAddParametersUseFirstParameterOnly" value="0"/>
<add key="DefaultFileNameAddParametersIncludeRangeParameters" value="0"/>

This is an old/grandfathered setting, and these days, it should stay set to "current". Legacy XML formats are no longer supported.

<!-- xmlFormatType: current or legacy                              -->
<add key="XmlFormatType" value="current" />

Multi-Factor authentication (MFA) can be enabled and configured here. If you enable it, you should change the MFASecretKey setting below. This is used to encrypt settings in the cookie that is stored on the end users browser.

Don't forget to set the MFADaysUntilExpiration setting to the number of days until MFA cookie expires and the end user is forced to re-authenticate. Note, enabling this setting will prevent anyone who's not authenticated from running reports, even with a valid login. 

When enabled, it only forces verification if you have configured an email address for the user. If using LDAP/LDAPS, it will pull the email address from Active Directory. Otherwise, it uses the one you configured when you created the user manually.

<!-- Enable/Force MFA                                              -->
<add key="EnableMFA" value="0" />
<add key="MFASecretKey" value="YourWebPortalRandomKey2030!@#$%^" />
<add key="MFADaysUntilExpiration" value="90" />
<add key="MFAMailSubject" value="Your Web Portal MFA Verification Code" />

For those companies that are integrating Web Portal with other web-based applications (like SalesForce), you can configure a command line only mode. This removes/blocks the "normal" Web Portal end user interface (where users see a list of reports they have access to). With this enabled, they see nothing. You can send them a command line, and it will require them to authenticate once (for 10 users by default -- dependent on other IIS time out settings like app pool settings), and then it will run the command line. Command lines sent afterwards will just run/prompt without requesting authentication.

<!-- Enable/Force Command Line Only Mode (Hide Main Interface)    -->
<add key="HideEndUserPortal_CommandLineOnly" value="0" />

Note, passwords stored in the web.config file will be automatically obfuscated (changed from showing in plain text) once you start the Administrator interface and click on the Settings tab. By default, your IIS application and sites on the server should already be secure. We obfuscate the password so it's not easily readable just in case someone happens to open the file (which is not possible over the internet).  

This concludes the web.config overview. Specific Web Portal features like MFA and command lines are further discussed under their own topics.