Question Service Cannot load app.config on windows server 2003

groadsvb

Well-known member
Joined
Nov 13, 2006
Messages
75
Programming Experience
Beginner
I have a service that works fine on my windows 7 system where I develop. I loaded the service onto the Windows Sever 2003 where it needs to run but I get the following error:

Service cannot be started. System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for EnRoute/Logging: Request failed.
(C:\Program Files\EnRoute Emergency Systems\CIC\Enroute.Interface.CIC.Service.exe.Config line 18) --->
System.Security.SecurityException: Request failed.
at System.RuntimeMethodHandle.PerformSecurityCheck(Object obj, RuntimeMethodHandleInternal method, RuntimeType parent, UInt32 invocationFlags)
at System.RuntimeMethodHandle.PerformSecurityCheck(Object obj, IRuntimeMethodInfo method, RuntimeType parent, UInt32 invocationFlags)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
at System.Configuration.TypeUtil.InvokeCtorWithReflectionPermission(ConstructorInfo ctor)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.CreateSectionImpl(RuntimeConfigurationRecord confi...



VB.NET:
<?xml version="1.0"?>
<configuration>
  <configSections>
    <sectionGroup name="EnRoute" type="System.Configuration.ConfigurationSectionGroup, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <section name="CICServiceSettings" type="EnRoute.Interface.CIC.Common.CICServiceSettings, EnRoute.Interface.CIC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>     
      <section name="Logging" type="EnRoute.Common.Logging.Config.ConfigHandler, EnRoute.Common"/>
      <section name="Services" type="EnRoute.Common.ServiceLocator.ConfigHandler, EnRoute.Common"/>
      <section name="InterfaceServer" type="EnRoute.Common.Interfaces.InterfaceServerSetting, EnRoute.Common.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
      <section name="DMPP2020ServerSettings" type="EnRoute.Common.Interfaces.TCP.TCPClientSettings, EnRoute.Common.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
      <section name="DMPP2020ProtocolSettings" type="EnRoute.Interface.CIC.DMPP2020.DMPP2020ProtocolSettings, EnRoute.Interface.CIC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
    </sectionGroup>
  </configSections>
  <connectionStrings>
    <add name="Primary" connectionString="Server=tcp:ustawvsqlclustr; Database=CadSQLv2dev;Uid=CadSQLUser;Pwd=CadSQLUser"/>
    <add name="Failover" connectionString="Server=tcp:ustawvsqlclustr; Database=CadSQLv2dev;Uid=CadSQLUser;Pwd=CadSQLUser"/>
  </connectionStrings>
  <EnRoute>
     <CICServiceSettings CICVendorID="0D613005-C3D3-455A-947A-013B08E2EF0E"/>
    <InterfaceServer ServerType="EnRoute.Common.Interfaces.TCP.TCPClient, EnRoute.Common.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" ServerSettingsGroupName="EnRoute/DMPP2020ServerSettings"/>
    <DMPP2020ServerSettings  MessageHandlerType="EnRoute.Interface.CIC.DMPP2020.MessageHandler, EnRoute.Interface.CIC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DataProcessorType="EnRoute.Interface.CIC.Vendor.KYCIC.DataProcessor, EnRoute.Interface.CIC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DataConverterType="EnRoute.Interface.CIC.Vendor.KYCIC.Converter, EnRoute.Interface.CIC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Port="11912" ServerIpAddress="10.44.60.147"/>
    <DMPP2020ProtocolSettings Encryption="false" BookID="1" InitVector=""/>
    <Logging>
      <listener Type="EnRoute.Common.Logging.Listeners.ConsoleListener"/>
      <listener Type="EnRoute.Common.Logging.Listeners.SQLListener"/>
      <listener Type="EnRoute.Common.Logging.Listeners.FileListener"/>
    </Logging>
    <Services Type="EnRoute.Common.ServiceLocator.BasicServiceLocator" ConfigLoader="EnRoute.Common.ServiceLocator.SQLServiceLoader" PrimaryConnectionString="Server=tcp:ustawvsqlclustr; Database=CadSQLv2dev;Uid=CadSQLUser;Pwd=CadSQLUser" FailoverConnectionString="Server=tcp:ustawvsqlclustr; Database=CadSQLv2dev;Uid=CadSQLUser;Pwd=CadSQLUser" systemID="825c5abd-bc52-4f38-b9fe-73ec3bfef2e3"/>
    
  </EnRoute>
  <system.diagnostics>
    <switches>
      <add name="holdForDebug" value="0"/>
    </switches>
  </system.diagnostics>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
 
There was a Strange solution to the problem. The config file had the "blocked" property set. Unchecked that on the config file and problem solved. Thanks.
 
Back
Top