Friday, July 3, 2015

System.Configuration The entry 'XXX has already been added (C:\Program Files (x86)\Microsoft BizTalk Server 2010\BTSNTSvc64.exe.Config)

Problem Statement:
Sometimes if we get following kind of error message:

Error writing to log. System.Configuration The entry 'XXXX' has already been added. (C:\Program Files (x86)\Microsoft BizTalk Server 2010\BTSNTSvc64.exe.Config line 156)


Cause of Error:

This is the result of a double entry in the config files BTSNTSvc.exe.Config or BTSNTSvc64.exe.Config and machine.config

Solution:

Option 1:

Search machine.config and BTSNTSvc.exe.Config ( or BTSNTSvc64.exe.Config) and remove double entry.


Option 2:

In BTSNTSvc.exe.Config ( or BTSNTSvc64.exe.Config) replace below lines of code.

      <add name="XXXX" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

        filePath="D:\AAAA\Config\BBBB.config" />

with


<remove name="XXXX"/>
 <add name="XXXX" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

        filePath="D:\AAAA\Config\BBBB.config" />


Then it will work :-)

Regards
Kundan

No comments:

Post a Comment