I have deleted some of some project or solution specific settings in the past and received weird errors as a result. Sometimes its better just to create a whole new project and copy your classes over to it rather then spend all that time trying to figure
out how to make things right. I think you will find that it doesnt take that long.
patientd1
Member
90 Points
211 Posts
ConfigurationErrorsException was unhandled.
Sep 02, 2010 02:43 PM|LINK
I am trying to create a console application with .Net Framework 3.5.
I mannually added refrence to System.configuration.
Then I added new item ApplicationConfigurationFile.
I have the following code to app.config:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="HL7FileServerIn" value="C:\HL7Orders"/> <add key="SleepTime" value="5000"/> </appSettings> <ConnectionStrings> <add name="DBConnectionString" connectionString="Data Source=CSI-DEEP-ONE\MSSQLSERVER_XYZ;Initial Catalog=Accessioning;Persist Security Info=True;User ID=MyUser;Password=MyPasss"/> </ConnectionStrings> </configuration>When I run my aplication in a debugger I get the following exception. Please help me get rid of this problem.
ConfigurationErrorsException was unhandled.
System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize
InnerException: {"Unrecognized configuration section ConnectionStrings. (C:\\Projects\\FileSystemWatcher\\FileSystemWatcher\\bin\\Debug\\FileSystemWatcher.vshost.exe.config line 7)"}
Starkemc
Member
197 Points
54 Posts
Re: ConfigurationErrorsException was unhandled.
Sep 02, 2010 03:50 PM|LINK
I have deleted some of some project or solution specific settings in the past and received weird errors as a result. Sometimes its better just to create a whole new project and copy your classes over to it rather then spend all that time trying to figure out how to make things right. I think you will find that it doesnt take that long.