Export (0) Print
Expand All

DSS Application Configuration File

Microsoft Robotics

Glossary Item Box

Microsoft Robotics Developer StudioSend feedback on this topic

DSS Application Configuration File

Several Decentralized Software Services (DSS) runtime features including message logging, generation of debug messages, and handling of service request timeouts can be configured through an application configuration file. An application configuration is an XML file that must have the same name as the application, with a .config extension appended. It must also be located in the same folder as the application itself.

When running services using the DSS Host Tool (DssHost.exe), the application configuration file is called dsshost.exe.config. However, the controls can also be applied to an executable that starts the DSS runtime using the DssEnvironment static class. In this case, the name of the application configuration file is that of the application executable with .config appended.

Bb608245.hs-note(en-us,MSDN.10).gifApplication configuration files are read at application start-up time. This means that changes made to the application configuration file while the application is running are not effective until the application is restarted.

A sample dsshost.exe.config is shown below. The comments explain most of the options that are available.

Some of the key features included are:

  • Enabling tracing and capture of network traffic and messages between services
  • Setting the trace levels for log messages from various components (sent to http://HostName:HttpPort/console/output)
  • Setting default port numbers for HTTP and TCP so that you do not have to type them on the command line
  • Specifying where to write log files
  • Enabling/Disabling local file write access
  • Enabling/Disabling security
  • Enabling/Disabling remote network access 
  • Setting timeout values

 For the most up to date information, look at the config file in the bin folder of your RDS installation.

 

XML
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <!-- configuration settings -->
  <!-- DSS is a hosting environment that executes a lot of similar, brief CCR tasks
       Server GC is appropriate due to the task based framework for all services.
  -->
  <runtime>
    <gcServer enabled="true"/>
  </runtime>
  <system.diagnostics>
    <sources>
      <source name="System.Net">
        <listeners>
          <add name="System.Net" />
        </listeners>
      </source>
      <source name="System.Net.Sockets">
        <listeners>
          <add name="System.Net" />
        </listeners>
      </source>
      <source name="System.Net.Cache">
        <listeners>
          <add name="System.Net" />
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add name="System.Net" type="System.Diagnostics.TextWriterTraceListener" initializeData="dsshost.log" />
    </sharedListeners>
    <switches>
      <!-- Network tracing
            value Description  
            0 Off—disables tracing
            1 Critical events are logged
            2 Errors are logged
            4 Warnings are logged
            8 Method call entry and exit is logged.
            16 Network traffic is logged. 
            -->
      <add name="System.Net.Sockets" value="1" />
      <add name="System.Net" value="1" />
      <add name="System.Net.Cache" value="1" />
      <!-- DSS Trace switch values: Off 0, Error 1, Warning 2, Info 3, Verbose 4 -->
      <add name="Microsoft.Ccr.Core" value="2" />
      <add name="Microsoft.Dss.Core" value="3" />
      <add name="Microsoft.Dss.Services.TestBase" value="3" />
      <add name="Microsoft.Dss.Services" value="3" />
      <add name="Microsoft.Dss.Services.Transports" value="2" />
      <add name="Microsoft.Dss.Services.Forwarders" value="2" />
    </switches>
    <!-- Here you can set up logging -->
    <trace autoflush="true" />
  </system.diagnostics>
  <appSettings>

    <!-- Maximum number of pneding outbound requests. Set this number if http requests are failing 
    <add key="Microsoft.Dss.Services.Transports.Http.MaxPendingRequests" value="5"/>
    -->

    <!-- Uncomment the port settings below to set the default ports. 
         These settings are used if the ports are not specified on the command line. -->

    <!--Http port to use if none specified on the host commandline or runtime initialization-->
    <!--<add key="Microsoft.Dss.Core.HttpPort" value="50000" />-->
    <!--Tcp port to use if none specified on the host commandline or runtime initialization-->
    <!--<add key="Microsoft.Dss.Core.TcpPort" value="50001" />-->
    
    <!-- Message logging path for writing log files and enabling messages capture -->
    <!-- <add key="Microsoft.Dss.Core.MessageLoggingPath" value="store\logs" /> -->
    <!-- Hostname to use for Dss node, for all transports -->
    <!-- <add key="Microsoft.Dss.Core.HostName" value="localhost" /> -->


    <!--Assembly resource name containing resources for default pages. Empty string will default to Microsoft.Dss.Runtime.Dll-->
    <add key="Microsoft.Dss.Core.DefaultRuntimeResources" value="DssBranding.dll" />
    <!-- Determines local file system access. Values:
              Read - No file writes performed by Dss core
              ReadWrite - Writes enabled (cache updates allowed)
              -->
    <add key="Microsoft.Dss.Core.LocalFileAccess" value="ReadWrite" />
    <!--Message Capture values:
            CaptureInbound
            CaptureOutbound
            CaptureInboundOutbound        
        -->
    <add key="Microsoft.Dss.Services.Forwarders.MessageCapture" value="" />
    <!-- DsspTimeoutTracking enables/disables expiration on all DsspOperations, using DsspOperation.DefaultShortTimeout -->
    <add key="Microsoft.Dss.Services.Forwarders.DsspTimeoutTracking" value="false" />
    <!-- DsspTimeScale determines the absolute Timeout values specified at runtime. 
             A scale of 2.0 multiplies all timespans specified by 2, effectively doubling all timeout values  -->
    <add key="Microsoft.Dss.Services.Forwarders.DsspTimeScale" value="1.0" />
    <!-- 
        <add key="Microsoft.Dss.Services.Transports.UseBinarySerialization" value="Disabled"/>
         -->
    <!-- Comment the line below to disable security -->
    <!-- Security file is found relative to the Root directory of the running node -->
    <add key="Security" value="store\SecuritySettings.xml" />
    <add key="ClientSettingsProvider.ServiceUri" value="" />
 
    <!-- When this property is false (or absent), the node will listen only on 
         the loopback interface. This is the default behavior in RDS4.0.
         If you require the previous behavior, which listens on all interfaces, set
         this property to true. -->
    <add key="Microsoft.Dss.Services.Transports.AllowUnsecuredRemoteAccess" value="false"/>
</appSettings> <system.net> <defaultProxy> <proxy bypassonlocal="True" /> </defaultProxy> </system.net> </configuration>

 

 

© 2012 Microsoft Corporation. All Rights Reserved.

Show:
© 2014 Microsoft