none
.net framework The configuration section 'connectionStrings' has an unexpected declaration. RRS feed

  • Question

  • i really need help i cant set a hotkey on this program unless i can fix this error

    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.Configuration.ConfigurationErrorsException: The configuration section 'connectionStrings' has an unexpected declaration.
       at System.Configuration.ConfigurationManager.get_ConnectionStrings()
       at System.Configuration.PrivilegedConfigurationManager.get_ConnectionStrings()
       at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
       at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
       at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
       at System.Configuration.SettingsBase.get_Item(String propertyName)
       at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
       at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
       at hSwitch.Properties.Settings.get_i()
       at hSwitcher.frmHook.frmHook_Load(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at hSwitcher.frmHook.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5466 (Win7SP1GDR.050727-5400)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    hSwitch
        Assembly Version: 1.2.0.0
        Win32 Version: 1.2.0.0
        CodeBase: file:///C:/Users/dfowler/Desktop/hSwitch.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5460 (Win7SP1GDR.050727-5400)
        CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5466 (Win7SP1GDR.050727-5400)
        CodeBase: file:///C:/windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5462 (Win7SP1GDR.050727-5400)
        CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
        CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
        CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    Monday, January 7, 2013 5:29 AM

All replies

  • There should be some problem in app.config file. Can you show us your configuration file? Or atleast ConnectionStrings section.

    Please mark this post as answer if it solved your problem. Happy Programming!

    Monday, January 7, 2013 9:21 AM
  • how do i find this app.config file? i didnt install the program i just run it
    Monday, January 7, 2013 5:55 PM
  • In the foldet where your application is present, you file a configuration file with name <ApplicationName>.exe.config. For example, if your application name is MyProgram.exe, then configuration file name will be, MyProgram.exe.config.

    Please mark this post as answer if it solved your problem. Happy Programming!

    Tuesday, January 8, 2013 2:28 AM
  • heres a vid of the error. your help hasnt helped me yet :(

    http://youtu.be/YJJKWKjUVbc

    Monday, January 14, 2013 12:46 AM
  • Go to the location from where your exe is running. Find a file with a name something like yourExeName.exe.config and open it in notepad. Paste the content here.

    We will be able to solve your issue only then. Waiting for your file.


    Thanks, Durgesh Chaudhary. http://home.techphernalia.com

    Wednesday, February 6, 2013 12:37 PM
  • Hey I am having the same problem, can u help me with that??
    Tuesday, March 17, 2015 7:01 AM