Sunday, May 8, 2011

Configuration system failed to initialize

As I was adding my project to n-tier projects an error occured saying:
The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception
and in it's details it is saying:
Configuration system failed to initialize
I tried to figure out the solution bu in vain
I also did some search but I noticed that everybody is taking that it is a problem in app.config and user.config files
So after hours of pain:
I fixed the problem by deleting the user.config file and deleting an error in app.config file more specifically in userSettings
I noticed that it is writen twice so I deleted one of them
Also I made sure that <ConfigSection> is the first Root in <Configuration>
Try This It may help you ,Tell me your experience

No comments:

Post a Comment