Partager via


An error occurred creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties

You may receive the below error message while installing Microsoft® SQL Server® 2008 Express Setup as a part of the Visual Studio Setup.

System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

As per the fusion log:

The operation failed.  
Bind result: hr = 0x80070002. The system cannot find the file specified.

I launched the Setup in debugger and captured a crash dump.  I found the following information from the crash dump:

0:000> kpnL50  
# ChildEBP RetAddr 
00 0017e788 771066c9 ntdll!KiFastSystemCallRet(void)   
01 0017e78c 04bc8e08 user32!NtUserWaitMessage(void)+0xc   
02 0017e820 04bc88f7 System_Windows_Forms_ni!System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(<HRESULT 0x80004001>)+0x3c8   
03 0017e878 04bc8741 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(<HRESULT 0x80004001>)+0x177   
04 0017e8a8 050de597 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.RunMessageLoop(<HRESULT 0x80004001>)+0x61   
05 0017e8c0 05112d98 System_Windows_Forms_ni!System.Windows.Forms.Application.RunDialog(<HRESULT 0x80004001>)+0x33   
06 0017e94c 05112faf System_Windows_Forms_ni!System.Windows.Forms.Form.ShowDialog(<HRESULT 0x80004001>)+0x370   
07 0017e98c 050df6f2 System_Windows_Forms_ni!System.Windows.Forms.Form.ShowDialog(<HRESULT 0x80004001>)+0x7   
08 0017e98c 050e80c6 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.OnThreadException(<HRESULT 0x80004001>)+0xd2   
09 0017e998 050eab4c System_Windows_Forms_ni!System.Windows.Forms.Control.WndProcException(<HRESULT 0x80004001>)+0x16   
0a 0017ea54 04bb8512 System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.OnThreadException(<HRESULT 0x80004001>)+0xc   
0b 0017ea54 002b0a34 System_Windows_Forms_ni!System.Windows.Forms.NativeWindow.Callback(<HRESULT 0x80004001>)+0x72

0:000> !pe   
Exception object: 01d017bc   
Exception type: System.Configuration.ConfigurationErrorsException   
Message: An error occurred creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.   
InnerException: System.IO.FileNotFoundException, use !PrintException 01cf2048 to see more   
StackTrace (generated):   
    SP       IP       Function   
    0017E5A0 6423FA81 System_Configuration_ni!System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(System.String, Boolean ByRef)+0x111   
    0017E658 6423F8C8 System_Configuration_ni!System.Configuration.BaseConfigurationRecord.GetSectionRecursive(System.String, Boolean, Boolean, Boolean, Boolean, System.Object ByRef, System.Object ByRef)+0x598   
    0017E6F0 6423F309 System_Configuration_ni!System.Configuration.BaseConfigurationRecord.GetSection(System.String, Boolean, Boolean)+0x39   
    0017E70C 6423F2B9 System_Configuration_ni!System.Configuration.BaseConfigurationRecord.GetSection(System.String)+0x9   
    0017E710 64233821 System_Configuration_ni!System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(System.String)+0x41   
    0017E724 64242B4F System_Configuration_ni!System.Configuration.ConfigurationManager.GetSection(System.String)+0x4f   
    0017E730 79900220 System_ni!System.Configuration.ClientSettingsStore.ReadSettings(System.String, Boolean)+0xa0   
    0017E770 798DAB09 System_ni!System.Configuration.LocalFileSettingsProvider.GetPropertyValues(System.Configuration.SettingsContext, System.Configuration.SettingsPropertyCollection)+0x79   
    0017E7C4 798DA9B3 System_ni!System.Configuration.SettingsBase.GetPropertiesFromProvider(System.Configuration.SettingsProvider)+0x103   
    0017E800 798FF815 System_ni!System.Configuration.SettingsBase.GetPropertyValueByName(System.String)+0x85   
    0017E814 798FF73B System_ni!System.Configuration.SettingsBase.get_Item(System.String)+0x3b   
    0017E844 798FF5C7 System_ni!System.Configuration.ApplicationSettingsBase.GetPropertyValue(System.String)+0x37   
    0017E858 798FF53B System_ni!System.Configuration.ApplicationSettingsBase.get_Item(System.String)+0x3b   
   0017E888 005D547A LandingPage!Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings.get_WindowPlacement()+0x12   
    0017E898 005D1704 LandingPage!Microsoft.SqlServer.Configuration.LandingPage.LandingPageForm.OnLoad(System.EventArgs)+0x54   
    0017E8D4 04BC4145 System_Windows_Forms_ni!System.Windows.Forms.Form.OnCreateControl()+0x55   
    0017E8E0 04BB6D71 System_Windows_Forms_ni!System.Windows.Forms.Control.CreateControl(Boolean)+0x181   
    0017E91C 04BB6B74 System_Windows_Forms_ni!System.Windows.Forms.Control.CreateControl()+0x24   
    0017E934 04BC3008 System_Windows_Forms_ni!System.Windows.Forms.Control.WmShowWindow(System.Windows.Forms.Message ByRef)+0x98   
    0017E970 04BB8966 System_Windows_Forms_ni!System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)+0x2b6   
    0017E9C8 04BC1DAA System_Windows_Forms_ni!System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)+0x2a   
    0017E9D4 04BC1D60 System_Windows_Forms_ni!System.Windows.Forms.ContainerControl.WndProc(System.Windows.Forms.Message ByRef)+0x10   
    0017E9DC 04BC2F51 System_Windows_Forms_ni!System.Windows.Forms.Form.WmShowWindow(System.Windows.Forms.Message ByRef)+0x41   
    0017E9EC 04BC1B34 System_Windows_Forms_ni!System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message ByRef)+0x154   
    0017EA00 04BB86A0 System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)+0x10   
    0017EA08 04BB8621 System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)+0x31   
    0017EA1C 04BB84FA System_Windows_Forms_ni!System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)+0x5a

StackTraceString: <none>  
HResult: 80131902   
0:000> !do 01d017bc   
Name: System.Configuration.ConfigurationErrorsException   
MethodTable: 64246b18   
EEClass: 642127dc   
Size: 92(0x5c) bytes   
(C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll)   
Fields:   
      MT    Field   Offset                 Type VT     Attr    Value Name   
788d0d28  40000b5        4        System.String  0 instance 01d0d690 _className   
788d019c  40000b6        8 ...ection.MethodBase  0 instance 00000000 _exceptionMethod   
788d0d28  40000b7        c        System.String  0 instance 00000000 _exceptionMethodString   
788d0d28  40000b8       10        System.String  0 instance 01d01c30 _message   
788ca684  40000b9       14 ...tions.IDictionary  0 instance 00000000 _data   
788d0ebc 40000ba 18 System.Exception 0 instance 01cf2048 _innerException   
788d0d28  40000bb       1c        System.String  0 instance 00000000 _helpURL   
788d0944  40000bc       20        System.Object  0 instance 01d023e0 _stackTrace   
788d0d28  40000bd       24        System.String  0 instance 00000000 _stackTraceString   
788d0d28  40000be       28        System.String  0 instance 00000000 _remoteStackTraceString   
788d2f74  40000bf       34         System.Int32  1 instance        0 _remoteStackIndex   
788d0944  40000c0       2c        System.Object  0 instance 00000000 _dynamicMethods   
788d2f74  40000c1       38         System.Int32  1 instance -2146232062 _HResult   
788d0d28  40000c2       30        System.String  0 instance 00000000 _source   
788d35f0  40000c3       3c        System.IntPtr  1 instance        0 _xptrs   
788d2f74  40000c4       40         System.Int32  1 instance -532459699 _xcode   
788d0d28  400315d       44        System.String  0 instance 00000000 _filename   
788d2f74  400315e       48         System.Int32  1 instance        0 _line   
788d0d28  4000253       4c        System.String  0 instance 01cd4434 _firstFilename   
788d2f74  4000254       54         System.Int32  1 instance        5 _firstLine   
00000000  4000255       50              SZARRAY  0 instance 00000000 _errors

0:000> !do 01cf2048   
Name: System.IO.FileNotFoundException   
MethodTable: 788b7638   
EEClass: 78684310   
Size: 84(0x54) bytes   
(C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)   
Fields:   
      MT    Field   Offset                 Type VT     Attr    Value Name   
788d0d28  40000b5        4        System.String  0 instance 00000000 _className   
788d019c  40000b6        8 ...ection.MethodBase  0 instance 00000000 _exceptionMethod   
788d0d28  40000b7        c        System.String  0 instance 00000000 _exceptionMethodString   
788d0d28  40000b8       10        System.String  0 instance 01cf24b8 _message   
788ca684  40000b9       14 ...tions.IDictionary  0 instance 00000000 _data   
788d0ebc  40000ba       18     System.Exception  0 instance 00000000 _innerException   
788d0d28  40000bb       1c        System.String  0 instance 00000000 _helpURL   
788d0944  40000bc       20        System.Object  0 instance 01cf29ec _stackTrace   
788d0d28  40000bd       24        System.String  0 instance 00000000 _stackTraceString   
788d0d28  40000be       28        System.String  0 instance 00000000 _remoteStackTraceString   
788d2f74  40000bf       34         System.Int32  1 instance        0 _remoteStackIndex   
788d0944  40000c0       2c        System.Object  0 instance 00000000 _dynamicMethods   
788d2f74  40000c1       38         System.Int32  1 instance -2147024894 _HResult   
788d0d28  40000c2       30        System.String  0 instance 00000000 _source   
788d35f0  40000c3       3c        System.IntPtr  1 instance        0 _xptrs   
788d2f74  40000c4       40         System.Int32  1 instance -532459699 _xcode   
788d0d28  4001bb3       44        System.String  0 instance 00000000 _maybeFullPath   
788d0d28  4001bcf       48        System.String  0 instance 01cf15f8 _fileName   
788d0d28  4001bd0       4c        System.String  0 instance 01cf169c _fusionLog

0:000> !do 01cf24b8    
Name: System.String   
MethodTable: 788d0d28   
EEClass: 7868d66c   
Size: 698(0x2ba) bytes   
(C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)   
String: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.   
Fields:   
      MT    Field   Offset                 Type VT     Attr    Value Name   
788d2f74  4000096        4         System.Int32  1 instance      341 m_arrayLength   
788d2f74  4000097        8         System.Int32  1 instance      178 m_stringLength   
788d1a08  4000098        c          System.Char  1 instance       43 m_firstChar   
788d0d28  4000099       10        System.String  0   shared   static Empty   
    >> Domain:Value  00375b90:01b51198 <<   
788d1958  400009a       14        System.Char[]  0   shared   static WhitespaceChars   
    >> Domain:Value  00375b90:01b51720 <<

I found that there was an invalid entry in the userSettings section of the Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings file. So the resolution was to delete this configuartion file or delete the folder "Microsoft_Corporation". Since it is a cached copy location, there is no harm in doing it. In order to resolve the issue, try running the command: rd /s /q %localappdata%\Microsoft_Corporation

Comments

  • Anonymous
    September 25, 2013
    Thank you - saved the day. I got this after uninstalling a couple versions of SQL Server and trying to install a new one. I was starting to worry that I somehow trashed the .NET framework during the uninstall.

  • Anonymous
    March 07, 2014
    Thank you for this valuable information.  This got rid of the error.