String.Net “System.TypeInitializationException”类型的未经处理的异常在 Spring.NetDemo.exe 中发生
今天编写String.Net时,遇到“System.TypeInitializationException”类型的未经处理的异常在 Spring.NetDemo.exe 中发生
原因配置文件的顺序写错
原顺序:
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup> <configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler,Spring.Core"/>
<section name="objects" type="Spring.Context.Support.DefaultSectionHandler,Spring.Core"/>
</sectionGroup> </configSections> <spring>
<!--Spring.Net对象容器的配置-->
<context>
<!--容器里所有对象在哪里配置?-->
<resource uri="config://spring/objects"/>
</context> <!--objects:配置的容器的里面的对象-->
<objects xmlns="http://www.springframework.net" >
<description>An example that demonstrates simple IoC features.</description>
<object name="UserInfoDal" type="Spring.NetDemo.UserInfoDal, Spring.NetDemo" singleton="false" > </object>
</objects>
</spring> </configuration>
改正后的顺序为:
<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler,Spring.Core"/>
<section name="objects" type="Spring.Context.Support.DefaultSectionHandler,Spring.Core"/>
</sectionGroup> </configSections> <spring>
<!--Spring.Net对象容器的配置-->
<context>
<!--容器里所有对象在哪里配置?-->
<resource uri="config://spring/objects"/>
</context> <!--objects:配置的容器的里面的对象-->
<objects xmlns="http://www.springframework.net" >
<description>An example that demonstrates simple IoC features.</description>
<object name="UserInfoDal" type="Spring.NetDemo.UserInfoDal, Spring.NetDemo" singleton="false" > </object>
</objects>
</spring> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
String.Net “System.TypeInitializationException”类型的未经处理的异常在 Spring.NetDemo.exe 中发生的更多相关文章
- “System.BadImageFormatException”类型的未经处理的异常在 PurchaseDevices.Access.dll 中发生 其他信息: 未能加载文件或程序集“System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139”或它的某一个依赖项。试图加载格式不正确
引用sqlite的程序集时,有时会报如下异常: "System.BadImageFormatException"类型的未经处理的异常在 PurchaseDevices.Acces ...
- P/Invoke出现错误 System.NullReferenceException”类型的未经处理的异常在 未知模块。 中发生 未将对象引用设置到对象的实例。
问题 “System.NullReferenceException”类型的未经处理的异常在 未知模块. 中发生 未将对象引用设置到对象的实例. 解决方案 1.尝试 用管理员身份运行CMD,输入nets ...
- System.AccessViolationException”类型的未经处理的异常在 System.Data.dll 中发生。其它信息:尝试读取或写入受保护的内存。这通常指示其它内存已损坏。
错误背景: 操作系统:编程环境:VS2013. 语言:VB.net: 数据库:SQLserver2008 做数据库连接时.发生的错误: 错误提示为: 说明:用VB.net连接SQLServer数据 ...
- 使用C#在VS中开发:未处理AccessViolationException “System.AccessViolationException”类型的未经处理的异常
未处理AccessViolationException: “System.AccessViolationException”类型的未经处理的异常在System.Data.dll中发生 其他信息:尝试读 ...
- “System.FormatException”类型的未经处理的异常在 System.IdentityModel.dll 中发生 其他信息: 十六进制字符串格式无效。
如果你的 WebService 客户端证书配置都没问题,唯独调用接口会出现这个错误 “System.FormatException”类型的未经处理的异常在 System.IdentityModel.d ...
- c#重命名文件,报错“System.NotSupportedException”类型的未经处理的异常在 mscorlib.dll 中发生”
修改远程服务器的文件名,报错“System.NotSupportedException”类型的未经处理的异常在 mscorlib.dll 中发生”,“System.NotSupportedExcept ...
- “System.InvalidOperationException”类型的未经处理的异常在 ESRI.ArcGIS.AxControls.dll 中发生
问题描述: 新手们进行ArcGIS ArcObject开发时经常会遇到各种十分古怪的问题,比如下面的这个问题: “System.InvalidOperationException”类型的未经处理的异常 ...
- EF异常:“System.InvalidOperationException”类型的未经处理的异常在 mscorlib.dll 中发生
实体框架System.Data.Entity.SqlServer提供者类型”. SqlProviderServices EntityFramework. 的在应用程序配置文件注册状态"置疑 ...
- 使用过多的递归出现错误,“System.StackOverflowException”类型的未经处理的异常在 mscorlib.dll 中发生
class Program { static void Main(string[] args) { sub(0); } private static void sub(int count) { ...
随机推荐
- java实现视频断点上传文件
一.概述 所谓断点续传,其实只是指下载,也就是要从文件已经下载的地方开始继续下载.在以前版本的HTTP协议是不支持断点的,HTTP/1.1开始就支持了.一般断点下载时才用到Range和Content- ...
- CF191C Fools and Roads - 树剖解法
Codeforces Round #121 (Div. 1) C. Fools and Roads time limit per test :2 seconds memory limit per te ...
- Ambari 2.6.0 HDP 2.6.3集群搭建
1.安装环境说明 三台机器安装好CentOS-7-x86_64-Minimal-1708.iso 下载地址:https://www.centos.org/download/ 最好在安装时设置好IP和H ...
- 使用http-server在本地搭建一个HTTP服务器
安装http-server 在控制台中输入 npm install http-server -g 进行全局安装 共享资源 进入需要共享资源的目录,比如 D:\,然后在控制台中输入 http-serve ...
- 微信小程序 视频 组件
video 组件 视频组件 相关的api :wx.createVideoContext 支持的格式: 支持的编码格式 video 组件的属性: src:类型 字符串 必填 要播放视频的资源地址 (支持 ...
- leetcode-mid-math-172. Factorial Trailing Zeroes-NO-????
mycode 问题:为甚在小于200的时候,答案ok,大于等于200的时候,就少一个1??? class Solution(object): def trailingZeroes(self, n): ...
- 刃边法计算MTF(ESF、LSF、PSF)
MTF 调制传递函数 评价一个成像系统目前主流的办法主要有三种TV line检测,MTF检测,和SFR检测. MTF是Modulation Transfer Function的英文简称,中文为调制传递 ...
- Web - <a>标签中href="javascript:;"
javascript: 是一个伪协议,其他的伪协议还有 mail: tel: file: 等等. 1 <a id="jsPswEdit" class="set ...
- linux防火墙iptables简单介绍
--append -A chain Append to chain --delete -D chain Delete matching rule from chain ...
- 【BW系列】SAP BW实时抽取ECC数据的实现
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[BW系列]SAP BW实时抽取ECC数据的实现 ...