2
Vote

Exception thrown when try to run the client application to generate the log

description

Steps:
 
  1. added new wcf test.
  2. Clicked next on welcome screen.
  3. Specified wcf client application in "Execute a Client" option.
  4. hit run.
  5. Client application crashes and throws following exception:---------------------------

Error while setting up or running the program under test

 
Unhandled Exception: System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element. (C:\Projects\Output\Client\Administration\Administration.exe.Config line 28)
 
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
 
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
 
at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
 
at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
 
--- End of inner exception stack trace ---
 
at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
 
at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
 
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
 
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
 
at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
 
at System.Net.Configuration.SettingsSectionInternal.get_Section()
 
at System.Net.Sockets.Socket.InitializeSockets()
 
at System.Net.Sockets.Socket.get_SupportsIPv4()
 
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.get_HostName()
 
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.RegisterChannel(Boolean SecureChannel)
 
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
 
at Administration.AdministrationEntryPoint.Main(String[] args) in c:\Projects\Administration\Administration.cs:line 12

 

OK

comments