locked
Configuration options for the Dss runtime. Part 1 of 3. Logging messages between services RRS feed

  • General discussion

  • In this post will talk about the few (fortunately) options that modify Dss Runtime behavior, from the executable that starts Dss runtime. These options are in an XML file, named the same as the executable, with .config appended to its name. In the most common case, where DssHost.exe is used, so i will talk about  DssHost.Exe.Config. However these same options, can be applied on any configuration file for a executable that starts the Dss runtime (using DssEnvironment static class for example).

     

    In the configuation file, notice the following appSettings section:

     

     <appSettings>
      <add key="Microsoft.Dss.Services.Forwarders.MessageCapture" value=""/>
      <add key="Microsoft.Dss.Services.Forwarders.DsspTimeoutTracking" value="false"/>

      <!--
            <add key="Microsoft.Dss.Services.Forwarders.ServicePortAllocationTracking" value=""/>   
             -->
      <add key="Security" value="..\store\SecuritySettings.xml"/>

     </appSettings>

    1. Message Capture and Logging

    Using the MessageCapture option you can force the runtime to serialize all messages between services, and store in them log files, named after the URI of the service instance that sent or received the message. The values that are valid for this option are:

     

    •   <add key="Microsoft.Dss.Services.Forwarders.MessageCapture" value="CaptureInbound"/>

    Using the CaptureInbound flag, all messages received by a service, are serialized to XML, and saved to disk.

    •   <add key="Microsoft.Dss.Services.Forwarders.MessageCapture" value="CaptureOutbound"/>

    Using the CaptureOutbound flag, all messages sent by a service, are serialized to XML, and saved to disk.

    •   <add key="Microsoft.Dss.Services.Forwarders.MessageCapture" value="CaptureInboundOutbound"/>

    Using the CaptureInboundOutbound flag, all messages received or sent by a service, are serialized to XML, and saved to disk.

    The files are placed in the \store\logs directory and are text XML. Here is a sample directory layout after having run with the MessageCapture option set to CaptureInboundOutbound:

     

     Directory of C:\mri\main\Builds\x86dbg\Layout Files\store\logs

    03/26/2007  03:00 PM    <DIR>          .
    03/26/2007  03:00 PM    <DIR>          ..
    03/26/2007  03:00 PM    <DIR>          console
    03/26/2007  03:00 PM    <DIR>          constructor
    03/26/2007  03:01 PM        57,580,313 contractdirectory.xml
    03/26/2007  03:00 PM    <DIR>          contractdirectorytest
    03/26/2007  03:01 PM             5,002 controlpanel.xml
    03/26/2007  03:01 PM             1,489 defaulttarget.xml
    03/26/2007  03:00 PM    <DIR>          directory
    03/26/2007  03:01 PM         9,323,186 directory.xml
    03/26/2007  03:00 PM    <DIR>          directorytestservice
    03/26/2007  03:01 PM             5,605 gadgetserver.xml
    03/26/2007  03:00 PM    <DIR>          httptestclient
    03/26/2007  03:01 PM         3,763,328 httptestserver.xml
    03/26/2007  03:00 PM    <DIR>          manifestloader
    03/26/2007  03:01 PM            23,012 manifestloaderclient.xml
    03/26/2007  03:01 PM             7,983 mountpoint.xml
    03/26/2007  03:01 PM            19,743 resources.xml
    03/26/2007  03:00 PM            69,724 rtdiag.xml
    03/26/2007  03:00 PM    <DIR>          security
    03/26/2007  03:00 PM    <DIR>          subscriptionmanager
    03/26/2007  03:00 PM    <DIR>          tcptestclient
    03/26/2007  03:01 PM         3,749,971 tcptestserver.xml
    03/26/2007  03:00 PM    <DIR>          test
    03/26/2007  03:00 PM    <DIR>          test.runtimediagnosticsservice
    03/26/2007  03:01 PM            83,466 testaggregator.xml
    03/26/2007  03:01 PM            57,566 testdirectory.xml

    Notice that services with well know, fixed uris (like the Directory Service) will always have the same file created. Services that get a GUID in their URI (because they have set AllowMultiple=true in the [ServicePort] attribute), will go under a directory, named after the service prefix. The \subscriptionmanager directory above for example, contains the following logs, one for each instance of the subscription manager:

     Directory of C:\mri\main\Builds\x86dbg\Layout Files\store\logs\subscriptionmanager

    03/26/2007  03:00 PM    <DIR>          .
    03/26/2007  03:00 PM    <DIR>          ..
    03/26/2007  03:00 PM                59 02229147-6396-4633-80a8-729bbfcbba01.xml
    03/26/2007  03:00 PM                59 05457d05-611f-4a10-b671-d3db9793331b.xml
    03/26/2007  03:00 PM            15,337 0aebc961-5ad4-4f99-8e2d-ffe1dc6d017e.xml
    03/26/2007  03:00 PM                59 16ca3fcc-1d17-418f-96c4-a154111e4d45.xml
    03/26/2007  03:00 PM                59 192d9516-9c42-415c-aa55-1aef4d42ae04.xml
    03/26/2007  03:00 PM                59 1c060768-02c4-48b7-af54-8b4e72725b76.xml
    03/26/2007  03:00 PM                59 1e2b0e77-c9f2-418a-b659-010e0212a944.xml
    03/26/2007  03:00 PM                59 27ccf735-e2c0-4712-8a4d-8fe48811e133.xml
    03/26/2007  03:00 PM         1,534,557 32d085a0-89e1-4557-8eac-19e461e13a20.xml
    03/26/2007  03:00 PM                59 3c6794c2-ac6a-4218-929a-5c385fe8fe11.xml
    03/26/2007  03:00 PM                59 42e59c83-57c4-432e-a255-5a2d26c6977e.xml
    03/26/2007  03:00 PM                59 489c6632-dbf1-4895-864a-3966ead50ed6.xml
    03/26/2007  03:00 PM                59 4a138c7a-182f-44e3-a457-10828b0a82de.xml
    03/26/2007  03:00 PM                59 4ed9806e-a459-4cfc-885c-e002acae7e15.xml
    03/26/2007  03:00 PM                59 52dd02a2-5715-478d-8d06-3caecdcbcdab.xml
    03/26/2007  03:00 PM                59 5e2078dc-c99f-4023-8511-f7962e37ab91.xml
    03/26/2007  03:00 PM                59 605c2844-9c05-4a94-8ff0-cb745100c3a0.xml
    03/26/2007  03:00 PM                59 62eb5c6f-6da6-40f3-9374-cc5bc5f51f95.xml
    03/26/2007  03:00 PM                59 63bf7013-e729-4354-8626-a290c0552eb0.xml
    03/26/2007  03:00 PM                59 697e2dd6-8203-4c0a-9a60-e93c957c542e.xml
    03/26/2007  03:00 PM        36,339,511 6b1d83f8-1122-49a9-aa20-8b7befd5354e.xml
    03/26/2007  03:00 PM                59 6b3d0851-84ab-4541-a47c-35bc17512b62.xml
    03/26/2007  03:00 PM                59 72f44c16-4fab-42d0-85cd-25e0415487f7.xml
    03/26/2007  03:00 PM                59 73936807-31db-4b08-a4e8-08a6d7cd063f.xml
    03/26/2007  03:00 PM         1,531,553 7a3c6b31-d881-41c1-a6a3-275d6c97cdbb.xml
    03/26/2007  03:01 PM        10,253,960 8717f3a3-abd5-483d-9d25-2b8910ee9127.xml
    03/26/2007  03:00 PM                59 88b53bfe-7887-476f-8634-9a911fd8a378.xml
    03/26/2007  03:00 PM                59 919c51ed-6cdc-47ab-b56f-76b9567c1b74.xml
    03/26/2007  03:00 PM                59 94afc703-53c0-4843-980c-e2059deb8ffe.xml
    03/26/2007  03:00 PM                59 b2fe21a6-6c26-46c2-be4a-2d13ba9da023.xml
    03/26/2007  03:00 PM                59 c2ceffa3-f13d-41b6-805c-b61d3965eb94.xml
    03/26/2007  03:01 PM            41,382 d7b82930-3146-4425-b6fb-3e532ccb9798.xml
    03/26/2007  03:00 PM                59 d9c84dd6-1961-44f3-a777-29dc0dfee852.xml
    03/26/2007  03:00 PM                59 e1f5b9e1-dead-4f45-9fab-490368e045bb.xml
    03/26/2007  03:00 PM                59 e283d7b7-5e14-4de6-bf5b-00c2d33d7b03.xml
    03/26/2007  03:00 PM                59 effc41ac-ae4d-4ea4-a51e-a4b2315b8b52.xml
    03/26/2007  03:00 PM                59 f9abe914-a45d-45b3-9ef7-898b4a806749.xml

     

    An example of what is in a log file (directory.xml):

     

    <?xml version='1.0' encoding='utf-8'?>
    <DssOperationLog<s:Envelope xmlnsTongue Tied="
    http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlnsBig Smile="http://schemas.microsoft.com/xw/2004/10/dssp.html">
      <s:Header>
        <wsa:Action>http://schemas.microsoft.com/xw/2004/10/dssp.html:InsertRequest</wsa:Action>
        <wsa:To>dssp.tcp://georgioc-pc:19001/directory</wsa:To>
        <d:Timestamp>
          <d:Value>2007-03-26T15:07:33.8083308-07:00</d:Value>
        </d:Timestamp>
        <wsa:ReplyTo>
          <wsa:Address>dssp.tcp://georgioc-pc:19001/console/output</wsa:Address>
        </wsa:ReplyTo>
        <wsa:MessageID>uuid:1e7f8567-15f6-4bf5-a750-1939309801ed</wsa:MessageID>
      </s:Header>
      <s:Body>
        <InsertRequest xmlns="
    http://schemas.microsoft.com/xw/2004/10/directory.html">
          <Record>
            <d:Contract>http://schemas.microsoft.com/xw/2004/10/consoleoutput.html</d:Contract>
            <dTongue Tiedervice>dssp.tcp://georgioc-pc:19001/console/output</dTongue Tiedervice>
            <d:AliasList>
              <d:Alias>http://georgioc-pc:19000/console/output</d:Alias>
            </d:AliasList>
            <dStick out tongueartnerList />
          </Record>
        </InsertRequest>
      </s:Body>
    </s:Envelope>

    <s:Envelope xmlnsTongue Tied="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlnsBig Smile="http://schemas.microsoft.com/xw/2004/10/dssp.html">
      <s:Header>
        <wsa:Action>http://schemas.microsoft.com/xw/2004/10/dssp.html:InsertRequest</wsa:Action>
        <wsa:To>dssp.tcp://georgioc-pc:19001/directory</wsa:To>
        <d:Timestamp>
          <d:Value>2007-03-26T15:07:33.8083308-07:00</d:Value>
        </d:Timestamp>
        <wsa:ReplyTo>
          <wsa:Address>dssp.tcp://georgioc-pc:19001/mountpoint</wsa:Address>
        </wsa:ReplyTo>
        <wsa:MessageID>uuid:b4714f0f-4f15-4733-8018-9dd70ab3b5e2</wsa:MessageID>
      </s:Header>
      <s:Body>
        <InsertRequest xmlns="
    http://schemas.microsoft.com/xw/2004/10/directory.html">
          <Record>
            <d:Contract>http://schemas.microsoft.com/xw/2005/11/mountservice.html</d:Contract>
            <dTongue Tiedervice>dssp.tcp://georgioc-pc:19001/mountpoint</dTongue Tiedervice>
            <d:AliasList>
              <d:Alias>http://georgioc-pc:19000/mountpoint</d:Alias>
            </d:AliasList>
            <dStick out tongueartnerList>
              <dStick out tongueartner>
                <d:Contract>*</d:Contract>
                <dTongue Tiedervice>c:\mri\main\Builds\x86dbg\Layout Files\</dTongue Tiedervice>
                <dStick out tongueartnerList />
                <d:Name>d:TargetService</d:Name>
              </dStick out tongueartner>
            </dStick out tongueartnerList>
          </Record>
        </InsertRequest>
      </s:Body>

    </s:Envelope>

     

    Monday, March 26, 2007 10:12 PM