Exception: type initializer for 'system.data.sqlclient.sqlconnection'?

后端 未结 12 946
悲哀的现实
悲哀的现实 2020-12-11 02:35

I couldn\'t figure out what is the problem for this exception.

The type initializer for \'System.Data.SqlClient.SqlConnection\' threw an exception

12条回答
  •  清歌不尽
    2020-12-11 02:52

    This most likely means that there is an error in your app.config file, e.g. badly formed XML or unexpected elements. The error happens because the static fields inside SqlConnection read from app.config to determine trace detail level as described here: http://msdn.microsoft.com/en-us/library/ms254503.aspx

提交回复
热议问题