I couldn\'t figure out what is the problem for this exception.
The type initializer for \'System.Data.SqlClient.SqlConnection\' threw an exception
I have the same error and the problem was in Web.config. In my case, just add the connectionStrings tag and its value and problem solved.
your connection strings