An unhandled exception of type 'System.TypeInitializationException' occurred in System.ServiceModel.dll
异常“
An unhandled exception of type 'System.TypeInitializationException' occurred in System.ServiceModel.dll
Additional information: The type initializer for 'System.ServiceModel.DiagnosticUtility' threw an exception.
”
原因:配置文件中有如下数据库连接。
<connectionStrings >
<add name ="ConnStrHQ" connectionString ="Data Source=.;Initial Catalog=HeadQ;Persist Security Info=True;User ID=sa;Password=sa;Max Pool Size=512" />
</connectionStrings>
Any fool can write code that a computer can understand. Good programmers write code that humans can understand. –Martin Fowler
作者:『Gerry Ge』
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利。