Questions regarding to configuration of BTSNTSVC.exe.config/BTSNTSVC64.exe.config

1. : The autoConfig attribute only takes effect for ASP.NET web applications not .Net client applications.

The BizTalk host instances – BTSNTSVC.exe/BTSNTSVC64.exe are typical .net client applications here when calling the remote Web/WCF services.

Specifies whether to automatically configure the following settings to achieve optimal performance based on the machine configuration:

The values are set according to the KB article at https://support.microsoft.com/?id=821268.

This attribute does not affect the .NET Framework client applications; only ASP.NET applications.

 

2. <remove> element will only remove a pre-configured item. If the specified item cannot be found in all loaded config files, an internal exception will be thrown.

See the corresponding code and remarks on MSDN.

 // System.Configuration.ConfigurationElementCollection
private void BaseRemove(object key, bool throwIfMissing)

 

 

                if (throwIfMissing)
{
throw new ConfigurationErrorsException(SR.GetString("Config_base_collection_entry_not_found", new object[]
{
key
}));
}
return;

 

MSDN:

 

The <remove> element removes the connection management list entry for the specified server that was defined earlier in the configuration file or at a higher level in the configuration file hierarchy.

 

 

3. For using <clear/> element, the result should be the same as default setting.

 

<connectionManagement>     

      <clear/>

</connectionManagement>

 

 

4. What is connection management list?

 

It’s actually a collection of ConnectionManagementElement objects initialized in memory during process startup. I launched WinDbg to attach to my BTSNTSVC.exe process and tried to dump the values from the in-memory objects which is corresponding to my config file as below.

 

 

 

 

 

 

0:142> !dumpheap -type System.Net.Configuration.ConnectionManagementElementCollection

Loading the heap objects into our cache.

------------------------------

Heap 0

Address MT Size

021bade0 70be6770 96 1 System.Net.Configuration.ConnectionManagementElementCollection

021bade0 70be6770 96    

total 1 objects

------------------------------

 

0:142> !do 021bade0

Name: System.Net.Configuration.ConnectionManagementElementCollection

Fields:

      MT Field Offset Type VT Attr Value Name

715d6788 4000006 30 System.Boolean 1 instance 0 _bDataToWrite

715d6788 4000007 31 System.Boolean 1 instance 0 _bModified

715d6788 4000008 32 System.Boolean 1 instance 0 _bReadOnly

715d6788 4000009 33 System.Boolean 1 instance 0 _bElementPresent

715d6788 400000a 34 System.Boolean 1 instance 1 _bInited

708867dc 400000b 4 ...ionLockCollection 0 instance 00000000 _lockedAttributesList

708867dc 400000c 8 ...ionLockCollection 0 instance 00000000 _lockedAllExceptAttributesList

708867dc 400000d c ...ionLockCollection 0 instance 021bb67c _lockedElementsList

708867dc 400000e 10 ...ionLockCollection 0 instance 021bb6cc _lockedAllExceptElementsList

70888168 400000f 14 ...nfigurationValues 0 instance 021bae58 _values

715cfb08 4000010 18 System.String 0 instance 00000000 _elementTagName

708889e4 4000011 1c ...lementInformation 0 instance 00000000 _evaluationElement

70888128 4000012 20 ...onElementProperty 0 instance 0e011798 _elementProperty

7090cac4 4000013 2c System.Int32 1 instance 0 _fItemLocked

70886844 4000014 24 ...ontextInformation 0 instance 00000000 _evalContext

7088746c 4000015 28 ...nfigurationRecord 0 instance 0e010998 _configRecord

715d2ad4 40000af 50 System.Int32 1 instance 0 _removedItemCount

715d2ad4 40000b0 54 System.Int32 1 instance 0 _inheritedCount

715d43a8 40000b1 38 ...ections.ArrayList 0 instance 021bae40 _items

715cfb08 40000b2 3c System.String 0 instance 0e011b70 _addElement

715cfb08 40000b3 40 System.String 0 instance 0e001c70 _removeElement

715cfb08 40000b4 44 System.String 0 instance 0e001c8c _clearElement

715d6788 40000b5 35 System.Boolean 1 instance 0 bEmitClearTag

715d6788 40000b6 36 System.Boolean 1 instance 0 bCollectionCleared

715d6788 40000b7 37 System.Boolean 1 instance 0 bModified

715d6788 40000b8 58 System.Boolean 1 instance 1 bReadOnly

715c3a30 40000b9 48 ...ections.IComparer 0 instance 00000000 _comparer

715d6788 40000ba 59 System.Boolean 1 instance 0 internalAddToEnd

715cfb08 40000bb 4c System.String 0 instance 0dff0260 internalElementTagName

 

0:142> !do 021bae40

Name: System.Collections.ArrayList

Fields:

      MT Field Offset Type VT Attr Value Name

71586d84 4000bda 4 System.Object[] 0 instance 021bb364 _items

715d2ad4 4000bdb c System.Int32 1 instance 2 _size

715d2ad4 4000bdc 10 System.Int32 1 instance 2 _version

715cf744 4000bdd 8 System.Object 0 instance 00000000 _syncRoot

71586d84 4000bde 258 System.Object[] 0 shared static emptyArray

 

0:142> !psscor4.da -details 021bb364

Name: System.Object[]

Array: Rank 1, Number of elements 4, Type CLASS

Element Methodtable: 715cf744

[0] 021bb350

    Name: System.Configuration.ConfigurationElementCollection+Entry

   

    Fields:

              MT Field Offset Type VT Attr Value Name

        7090d9cc 40003d2 c System.Int32 1 instance 3 _entryType

        715cf744 40003d3 4 System.Object 0 instance 021bb248 _key

        70888070 40003d4 8 ...figurationElement 0 instance 021baff4 _value

[1] 021bb668

    Name: System.Configuration.ConfigurationElementCollection+Entry

   

    Fields:

              MT Field Offset Type VT Attr Value Name

        7090d9cc 40003d2 c System.Int32 1 instance 3 _entryType

        715cf744 40003d3 4 System.Object 0 instance 021bb594 _key

        70888070 40003d4 8 ...figurationElement 0 instance 021bb384 _value

[2] null

[3] null

 

0:142> !do 021baff4    

Name: System.Net.Configuration.ConnectionManagementElement

 

Fields:

      MT Field Offset Type VT Attr Value Name

715d6788 4000006 30 System.Boolean 1 instance 0 _bDataToWrite

715d6788 4000007 31 System.Boolean 1 instance 0 _bModified

715d6788 4000008 32 System.Boolean 1 instance 1 _bReadOnly

715d6788 4000009 33 System.Boolean 1 instance 1 _bElementPresent

715d6788 400000a 34 System.Boolean 1 instance 1 _bInited

708867dc 400000b 4 ...ionLockCollection 0 instance 00000000 _lockedAttributesList

708867dc 400000c 8 ...ionLockCollection 0 instance 00000000 _lockedAllExceptAttributesList

708867dc 400000d c ...ionLockCollection 0 instance 00000000 _lockedElementsList

708867dc 400000e 10 ...ionLockCollection 0 instance 00000000 _lockedAllExceptElementsList

70888168 400000f 14 ...nfigurationValues 0 instance 021bb120 _values

715cfb08 4000010 18 System.String 0 instance 021baf9c _elementTagName

708889e4 4000011 1c ...lementInformation 0 instance 00000000 _evaluationElement

70888128 4000012 20 ...onElementProperty 0 instance 0e011798 _elementProperty

7090cac4 4000013 2c System.Int32 1 instance 0 _fItemLocked

70886844 4000014 24 ...ontextInformation 0 instance 00000000 _evalContext

7088746c 4000015 28 ...nfigurationRecord 0 instance 0e010998 _configRecord

00000000 4002a00 38 0 instance 021bb080 properties

00000000 4002a01 3c 0 instance 021bb0a4 address

00000000 4002a02 40 0 instance 021bb0e8 maxconnection

 

 

0:142> !do 021bb120

Name: System.Configuration.ConfigurationValues

 

Fields:

      MT Field Offset Type VT Attr Value Name

715d6788 4000c0c 24 System.Boolean 1 instance 0 _readOnly

715d43a8 4000c0d 4 ...ections.ArrayList 0 instance 021bb150 _entriesArray

715c3a64 4000c0e 8 ...IEqualityComparer 0 instance 01ff78d0 _keyComparer

715d54d8 4000c0f c ...ections.Hashtable 0 instance 021bb168 _entriesTable

70bd4f40 4000c10 10 ...e+NameObjectEntry 0 instance 00000000 _nullKeyEntry

70bea6c0 4000c11 14 ...se+KeysCollection 0 instance 00000000 _keys

715cb8f0 4000c12 18 ...SerializationInfo 0 instance 00000000 _serializationInfo

715d2ad4 4000c13 20 System.Int32 1 instance 5 _version

715cf744 4000c14 1c System.Object 0 instance 00000000 _syncRoot

715c7314 4000c15 538 ...em.StringComparer 0 shared static defaultComparer

7088746c 4000126 28 ...nfigurationRecord 0 instance 0e010998 _configRecord

715d6788 4000127 25 System.Boolean 1 instance 0 _containsElement

715d6788 4000128 26 System.Boolean 1 instance 0 _containsInvalidValue

715d4020 4000129 50 ...tions.IEnumerable 0 shared static s_emptyCollection

 

0:142> !do 021bb150

Name: System.Collections.ArrayList

Fields:

      MT Field Offset Type VT Attr Value Name

71586d84 4000bda 4 System.Object[] 0 instance 021bb1f4 _items

715d2ad4 4000bdb c System.Int32 1 instance 4 _size

715d2ad4 4000bdc 10 System.Int32 1 instance 4 _version

715cf744 4000bdd 8 System.Object 0 instance 00000000 _syncRoot

 

0:142> !psscor4.da -details 021bb1f4

Name: System.Object[]

Array: Rank 1, Number of elements 4, Type CLASS

Element Methodtable: 715cf744

 

[0] 021bb1e4

    Name: System.Collections.Specialized.NameObjectCollectionBase+NameObjectEntry

 

    Fields:

              MT Field Offset Type VT Attr Value Name

        715cfb08 4000c16 4 System.String 0 instance 021baf9c Key

        715cf744 4000c17 8 System.Object 0 instance 021bb1d0 Value

 

[1] 021bb228

    Name: System.Collections.Specialized.NameObjectCollectionBase+NameObjectEntry

 

    Fields:

              MT Field Offset Type VT Attr Value Name

        715cfb08 4000c16 4 System.String 0 instance 0dff0260 Key

        715cf744 4000c17 8 System.Object 0 instance 021bb214 Value

[2] 021bb288

    Name: System.Collections.Specialized.NameObjectCollectionBase+NameObjectEntry

 

    Fields:

              MT Field Offset Type VT Attr Value Name

        715cfb08 4000c16 4 System.String 0 instance 021bafb0 Key

        715cf744 4000c17 8 System.Object 0 instance 021bb274 Value

[3] 021bb328

    Name: System.Collections.Specialized.NameObjectCollectionBase+NameObjectEntry

 

    Fields:

              MT Field Offset Type VT Attr Value Name

        715cfb08 4000c16 4 System.String 0 instance 021bafcc Key

        715cf744 4000c17 8 System.Object 0 instance 021bb314 Value

 

0:142> !do 021bb274    

Name: System.Configuration.ConfigurationValue

 

Fields:

      MT Field Offset Type VT Attr Value Name

7090cac4 40003da c System.Int32 1 instance 2 ValueFlags

715cf744 40003db 4 System.Object 0 instance 021bb248 Value

708867a4 40003dc 8 ...ropertySourceInfo 0 instance 021bb238 SourceInfo

 

0:142> !do 021bafb0    

Name: System.String

String: address

 

0:142> !do 021bb248

Name: System.String

String:      www.contoso.com

 

0:142> !do 021bb314    

Name: System.Configuration.ConfigurationValue

 

Fields:

      MT Field Offset Type VT Attr Value Name

7090cac4 40003da c System.Int32 1 instance 2 ValueFlags

715cf744 40003db 4 System.Object 0 instance 021bb308 Value

708867a4 40003dc 8 ...ropertySourceInfo 0 instance 021bb2f8 SourceInfo

 

0:142> !do 021bafcc    

Name: System.String

String: maxconnection

 

0:142> !do 021bb308

Name: System.Int32

Fields:

      MT Field Offset Type VT Attr Value Name

715d2ad4 40004a5 4 System.Int32 1 instance 24 m_value

 

Best regards,

WenJun Zhang