QESTField Configuration Guide
Applies to QESTField
This article details the configuration for the QESTField product
Contents
- 1 Configuration guide
- 1.1 Web.config
- 1.1.1 configSections
- 1.1.2 qestfield
- 1.1.3 appSettings
- 1.1.4 system.web
- 1.1.5 runtime
- 1.1.6 system.serviceModel
- 1.1.7 bindings
- 1.1.8 client
- 1.1.9 system.webServer
- 1.1 Web.config
Configuration guide
Web.config
Web.config is the primary configuration file for the QESTField ASP.NET web application. It resides in the root physical path of the web site. The file is an XML format file and can be edited by any standard text or XML editor.
The initial config file contains several major sections as shown below.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>...</configSections>
<qestfield>...</qestfield>
<appSettings>...</appSettings>
<system.web>...</system.web>
<runtime>...</runtime>
<system.serviceModel>...</system.serviceModel>
<system.webServer>...</system.webServer>
</configuration>
configSections
Defines additional configuration sections used by QESTField.
<configSections>
<section name="qestfield" type="QESTField.Common.QestfieldSection, QESTField.Common" />
</configSections>
Do not change this section unless advised to do so by Spectra QEST.
qestfield
This section contains settings used by QESTField to load workflows and understand communication with QESTNet.
<qestfield>
<contractModules>
<add name="Standard" assemblyName="QESTLab.Contracts.Models" />
...
</contractModules>
<viewModules>
<add name="Standard" assemblyName="QESTField" />
...
</viewModules>
<viewLocations>
<add format="~/Views/{1}/AsphaltFieldDensity/{0}.cshtml" />
...
</viewLocations>
</qestfield>
contractModules A list of assemblies containing types that shared by QESTNet and QESTField for communication. If there are any custom workflows, their contracts assemblies must be defined here. Known configurations that require custom assemblies are published with QESTField.
viewModules A list of assemblies containing QESTField workflow display code. If there are any custom workflows, their QESTField View assemblies must be defined here. Known configurations that require custom assemblies are published with QESTField.
viewLocations A list of locations used by QESTField to locate its templates. A full list of these is provided in a sample configuration file with QESTField. If there are any custom workflows, their view templates must be defined here. Known configurations with custom view templates are publishsed with QESTField.
Do not change these sections from their recommended contents unless advised to do so by Spectra QEST.
appSettings
This section contains name-and-value pairs for application settings.
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="loginUrl" value="~/Account/LogOn" />
<add key="aspnet:MaxJsonDeserializerMembers" value="150000" />
<add key="logo" value="~/Content/images/logo_small.png" />
<add key="showFavourableConcurrencyNotice" value="false" />
<add key="CustomFields.TextAreaThreshold" value="300"/>
</appSettings>
The logo setting can be changed to control the image that shows in the top left of the page:
qestfield logo: "~/Content/images/logo_small.png"
qestnet logo: "~/Content/images/logo_small_qestnet.png"
The showFavourableConcurrencyNotice setting can be changed to control whether an alert notice is shown when concurrent updates have occurred that were resolved in the current user's favor. Typically concurrent updates resolved in the users favor do not require notification, as all of the users changes were saved successfully. An alert is always shown when concurrent updates are resolved in a way that is not in the users favor such that some or all of their changes may have been lost.
show notice: "true"
hide notice: any other value
The CustomFields.TextAreaThreshold controls whether a text custom field will be displayed as a single line text box or a multi-line text area. Any text custom field defined with a maximum length, up to and including this size, will be displayed as single line text box. Others with a greater maximum length will be displayed as a multi-line text area.
Do not change other settings in this section unless advised to do so by Spectra QEST.
system.web
This section defines the core settings used by the QESTField web application. Do not change this section unless advised to do so by Spectra QEST.
Hosting in an IIS Server Farm
When hosting QESTField on an IIS Server Farm (instead of the more conventional single IIS server), a machine key that is consistent for all servers hosting QESTField must be specified to allow clients to connect to any of the machines. This can be adding a machineKey element to the system.web section. The exact keys and encryption methods may be any that are valid (see the Microsoft Documentation for more information). The keys should be generated on one of the servers that will be using them and transferred as directly as possible between them. The keys are hexadecimal strings, the simplest way to generate them is in the "Machine Keys" section of IIS Manager.
Do not use the keys presented in this example
<system.web>
<! --- Leave other existing config here ... -->
<machineKey
validationKey="21F090935F6E49C2C797F69BBAAD8402ABD2EE0B667A8B44EA7DD4374267A75D7AD972A119482D15A4127461DB1DC347C1A63AE5F1CCFAACFF1B72A7F0A281B"
decryptionKey="ABAA84D7EC4BB56D75D217CECFFB9628809BDB8BF91CFCD64568A145BE59719F"
validation="SHA1"
decryption="AES"
/>
</system.web>
While not required, these keys should be changed frequently.
runtime
This section defines the core settings used by the QESTField web application. Do not change this section unless advised to do so by Spectra QEST.
system.serviceModel
This section contains requires two subsections: bindings and client.
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="Lab_Session" ... > ... </binding>
<binding name="Lab_Query" ... > ... </binding>
<binding name="Lab_File" ... > ... </binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="net.tcp://localhost:52525/Lab" binding="netTcpBinding" ... />
<endpoint address="net.tcp://localhost:52525/Lab/query" binding="netTcpBinding" ... />
<endpoint address="net.tcp://localhost:52525/Lab/file" binding="netTcpBinding" ... />
</client>
</system.serviceModel>
bindings
The type of the bindings defined, need to match those defined for the Lab Service of the QESTNet that the QESTField will be connecting to. By default these bindings are TCP and defined separately for each of the three required endpoints. These client settings control the connection timeouts and buffer sizes, where not overridden by the QESTNet server's binding settings.
For more information on how to customize service bindings, see: https://msdn.microsoft.com/en-us/library/ms731399(v=vs.110).aspx
<bindings>
<netTcpBinding>
<binding name="Lab_Session" ... > ... </binding>
<binding name="Lab_Query" ... > ... </binding>
<binding name="Lab_File" ... > ... </binding>
</netTcpBinding>
</bindings>
<binding name="Lab_Session"
closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00"
sendTimeout="00:05:00"
transactionFlow="false"
transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard"
listenBacklog="10"
maxBufferPoolSize="2147483647"
maxBufferSize="2147483647"
maxConnections="10"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="None" >
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows">
</security>
</binding>
client
The client section defines the endpoints which the client connects to. QESTField requires three endpoints of QESTNet:
Endpoint Name | Address | Default Binding | Purpose |
---|---|---|---|
Lab_Session | / | Unsecured TCP | Allows QESTField to open and close QESTNet session and issue commands. |
Lab_Query | /query | Unsecured TCP | Allows QESTField to query data structures from QESTNet's LIMS functionality set. |
Lab_File | /file | Unsecured Streaming TCP | Streams the data content of large files. |
address: The endpoint address - typically only the host name must be changed to match the QESTNet server. If further customization of protocol or port has been made then those two must match the QESTNet server configuration.
binding: The binding type - must match the type of the binding configuration.
bindingConfiguration: The binding configuration - must match a name from the bindings section.
contract: The service interface - do not change.
name: The identifier for the endpoint - do not change.
<client>
<endpoint address="net.tcp://localhost:52525/Lab"
binding="netTcpBinding"
bindingConfiguration="Lab_Session"
contract="Spectra.QESTNET.Contracts.ISessionService"
name="Lab_Session" />
<endpoint address="net.tcp://localhost:52525/Lab/query"
binding="netTcpBinding" bindingConfiguration="Lab_Query"
contract="Spectra.QESTLab.Contracts.ILabQueryService"
name="Lab_Query" />
<endpoint address="net.tcp://localhost:52525/Lab/file"
binding="netTcpBinding" bindingConfiguration="Lab_File"
contract="Spectra.QESTLab.Contracts.ILabFileService"
name="Lab_File" />
</client>
For more information on how to customize the service client, see: https://msdn.microsoft.com/en-us/library/ms731704(v=vs.110).aspx
system.webServer
This section defines instructions to the IIS web server. Do not change this section unless advised to do so by Spectra QEST.
Error messages
Public sites by default will have any errors messages hidden by IIS. The error message will instead show a 500 - Internal server error.
To show the error change httpErrors:
errorMode: Set to "Detailed".
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
Ensure customErrors under system.web is configured:
mode: Set to "Off".
<system.webServer>
<customErrors mode="Off" />
</system.webServer>
An error message explaining the error will be shown instead.
Integrity | Curiosity | Empathy | Unity
The content of this page is confidential and for internal Spectra QEST use only. Do not share, duplicate or distribute without permission.