none
System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler RRS feed

  • Question

  • Hi,

    I have a client exe which when called loads an App.config from a remote location, this file previously  use to load properly when I used.net framework3.5. but lately I have started to use .net framework 4.0 and I am faced with the below exception. Please advice as to what should be done.

    is this a bug in .net framework 4.0 is there some patch for it that i can refer?

    System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for LoggingFramework: Request failed. (F:\HCW NDU\Tommy\app.config line 6) ---> System.Security.SecurityException: Request failed.
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Configuration.TypeUtil.CreateInstanceWithReflectionPermission(Type type)
       at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
       at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
       at System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
       at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
       --- End of inner exception stack trace ---
       at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
       at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
       at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
       at System.Configuration.ConfigurationManager.GetSection(String sectionName)
       at TietoEnator.HCW.Operational.LoggingFramework.Client.LogConfigReader.GetInstance() in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Operational\LoggingFramework\Client\LogConfigReader.cs:line 31
       at TietoEnator.HCW.Operational.LoggingFramework.Client.LogConfiguration..ctor() in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Operational\LoggingFramework\Client\LogConfiguration.cs:line 28
       at TietoEnator.HCW.Operational.LoggingFramework.Client.LogConfiguration.GetInstance() in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Operational\LoggingFramework\Client\LogConfiguration.cs:line 72
       at TietoEnator.HCW.Operational.LoggingFramework.Client.BaseLogger.GetConfigurationByLogType(String logType, String attributeName, String defaultValue) in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Operational\LoggingFramework\Client\BaseLogger.cs:line 248
       at TietoEnator.HCW.Operational.LoggingFramework.Client.BaseLogger.GetVerbosityLevel(String logType) in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Operational\LoggingFramework\Client\BaseLogger.cs:line 262
       at TietoEnator.HCW.Operational.LoggingFramework.Client.BaseLogger.IsErrorEnabled(String logType) in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Operational\LoggingFramework\Client\BaseLogger.cs:line 334
       at TietoEnator.HCW.Operational.Tracing.TETrace.Error(String message, Object value) in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Operational\Diagnostics\TETrace.cs:line 323
       at TietoEnator.HCW.OpenFramework.UIProcess.Exceptions.ExceptionMessageBox.Show(IWin32Window owner, String message, Exception exception, ExceptionMessageButtonStyle buttonStyle) in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Desktop\HCW.OF.UIProcess\Exceptions\ExceptionMessageBox.cs:line 280
       at TietoEnator.HCW.OpenFramework.UIProcess.UIPManager.Initialize(Object desktopContainer) in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Desktop\HCW.OF.UIProcess\UIPManager.cs:line 200
       at TietoEnator.HCW.OpenFramework.UIProcess.WinStartup.CreateUIPManager() in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Desktop\HCW.OF.UIProcess\WinStartup.cs:line 343
       at TietoEnator.HCW.OpenFramework.UIProcess.WinStartup.WinStartup_Activated(Object sender, EventArgs e) in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Desktop\HCW.OF.UIProcess\WinStartup.cs:line 364
       at System.Windows.Forms.Form.set_Active(Boolean value)
       at System.Windows.Forms.Form.WmActivate(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at TietoEnator.HCW.OpenFramework.UIProcess.WinStartup.WndProc(Message& m) in C:\OF\Open.Framework\OpenFramework\Releases\OF3.1.000\Desktop\HCW.OF.UIProcess\WinStartup.cs:line 273
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    Tuesday, July 24, 2012 3:48 AM

Answers

  • Hi Shirzad,

    Welcome to the MSDN Forum.

    This is a known issue, please take a look at this fix: http://support.microsoft.com/kb/2580188.

    CAUSE

    The issue occurs because the method fails to access configuration section from the application on network share.

    I hope this will be  helpful.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Shirzadkersy Wednesday, July 25, 2012 5:17 AM
    Wednesday, July 25, 2012 2:40 AM
    Moderator