I couldn\'t figure out what is the problem for this exception.
The type initializer for \'System.Data.SqlClient.SqlConnection\' threw an exception
In my case , the problem was modifying tag name in app.config file by mistake just compare your app.config file with another old one .. You will find out the problem ...