“System.Transactions.Diagnostics.DiagnosticTrace”的类型初始值设定项引发异常。
今天在项目中用log4net,App.config文件中增加了configSections节点,程序运行报错“System.Transactions.Diagnostics.DiagnosticTrace”。
解决方法:
configSections 节点要作为 configuration 节点下的第一个节点。
PS:以前遇到过这个问题,想不起来具体怎么解决了,只记得是个节点顺序问题。以后遇上这种冷门问题还是记录一下吧。
“System.Transactions.Diagnostics.DiagnosticTrace”的类型初始值设定项引发异常。的更多相关文章
- “System.Transactions.Diagnostics.DiagnosticTrace”的类型初始值设定项引发异常[WCF]
未处理System.TypeInitializationException HResult=-2146233036 Message=“System.ServiceModel.Diagnostics ...
- “System.Data.SqlClient.SqlConnection”的类型初始值设定项引发异常---解决方案
"System.Data.SqlClient.SqlConnection"的类型初始值设定项引发异常 问题出在了 .net 的C:\WINDOWS\Microsoft.NET\Fr ...
- 【WinForm】“System.Data.SqlClient.SqlConnection”的类型初始值设定项引发异常,无法识别的配置节 system.serviceModel
出现问题的原因: 在本机上没有出现问题,让一个同事测试的时候,在另外一台电脑上出现连接数据库失败,系统不能打开的问题 在网上搜了一下,有说是数据库连接字符串错误的,有说app.config文件配置不匹 ...
- “SYSTEM.DATA.SQLCLIENT.SQLCONNECTION”的类型初始值设定项引发异常---解决方案
“System.Data.SqlClient.SqlConnection”的类型初始值设定项引发异常 问题出在了 .net 的C:\WINDOWS\Microsoft.NET\Framework\v2 ...
- System.Data.Entity.Internal.AppConfig 类型初始值设定项引发异常
在一开始时将connectionStrings 写在了configSections之上如下图一示,结果抛出:“System.Data.Entity.Internal.AppConfig”的类型初始值设 ...
- 关于WPF System.windows.Media.FontFamily 的类型初始值设定项引发异常问题解决方法
造成原因:此问题的根本原因是.NET Framework January 2018 Rollup(KB4055002)与已安装的.NET Framework 4.7.1产品版本之间的MSI安装交互.R ...
- 使用EF访问数据库,出现“System.Data.Entity.Internal.AppConfig”的类型初始值设定项引发异常。
今天在使用的EF时候,发生了"System.Data.Entity.Internal.AppConfig"的类型初始值设定项引发异常.这样的一个错误 查了原因,原来是appconf ...
- C#使用NLOG System.TypeInitializationException,类型初始值设定项引发异常
C#如何使用NLOG,网上有很多介绍,本次使用时遇到一个问题,使用NLOG写日志时,出现初始化异常,基本异常信息如下: System.AggregateException: 发生一个或多个错误. -- ...
- Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache的类型初始值设定项引发异常。 ---> System.IO.FileLoadException: 未能加载文件或程序集
场景: 安装程序到全新的环境的电脑时中(此时已经安装了能正常安装程序电脑的环境) 完整错误: Application_ThreadException:System.TypeInitialization ...
随机推荐
- 2-3 tree使用
The 2-3 tree is also a search tree like the binary search tree, but this tree tries to solve the pro ...
- git stash的使用
https://git-scm.com/docs/git-stash 在git svn的时候使用,提交记录的时候,有部分文件的修改不需要commit. 在向svn进行git svn dcommit的时 ...
- zoj 3805 Machine
Machine Time Limit: 2 Seconds Memory Limit: 65536 KB In a typical assembly line, machines are c ...
- Bzoj 1616: [Usaco2008 Mar]Cow Travelling游荡的奶牛 动态规划
1616: [Usaco2008 Mar]Cow Travelling游荡的奶牛 Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 1006 Solved: ...
- Bzoj 1982: [Spoj 2021]Moving Pebbles 博弈论
1982: [Spoj 2021]Moving Pebbles Time Limit: 10 Sec Memory Limit: 64 MBSubmit: 130 Solved: 88[Submi ...
- use isSubstring to check if one word is a rotation of another.
1: /// <summary> 2: /// Assume you have a method isSubstring which checks if one word is a s ...
- Does anyone successfully use USB drive in Windows7 guest?
Hi, Does anyone successfully use USB drive in Windows7 guest? If I pass a USB drive to Windows7 gues ...
- oracle删除当前用户下所有表
1.如果有删除用户的权限,则可以: drop user user_name cascade; 加了cascade就可以把用户连带的数据全部删掉. 删除后再创建该用户.--创建管理员用户create u ...
- lightoj 1094 Farthest Nodes in a Tree 【树的直径 裸题】
1094 - Farthest Nodes in a Tree PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: ...
- hdoj 1869 六度分离【最短路径求两两边之间最长边】
六度分离 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis ...