• 异常:操作可能会破坏运行时稳定性


    “/”应用程序中的服务器错误。


    操作可能会破坏运行时稳定性。

    说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

    异常详细信息: System.Security.VerificationException: 操作可能会破坏运行时稳定性。

    源错误: 

    行 2439:                toThrow = new DataException(ex.Message, ex);
    行 2440:            }
    行 2441:            throw toThrow;
    行 2442:        }
    行 2443:        private static void EmitInt32(ILGenerator il, int value)


    源文件: G:647VS项目双英webDapperSqlMapper.cs    行: 2441 

    堆栈跟踪: 

    [VerificationException: 操作可能会破坏运行时稳定性。]
       Deserialized3231e7d-b930-47e9-a62d-86a2aa2a0d26(IDataReader ) +452
    
    [DataException: Error parsing column 3 (IsSectionDisabled=可用 - String)]
       Dapper.SqlMapper.ThrowDataException(Exception ex, Int32 index, IDataReader reader) in G:647VS项目双英webDapperSqlMapper.cs:2441
       Deserialized3231e7d-b930-47e9-a62d-86a2aa2a0d26(IDataReader ) +495
       Dapper.<QueryInternal>d__d`1.MoveNext() in G:647VS项目双英webDapperSqlMapper.cs:854
       System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +327
       System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
       Dapper.SqlMapper.Query(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable`1 commandTimeout, Nullable`1 commandType) in G:647VS项目双英webDapperSqlMapper.cs:773
       Etrol.Web.SQLSeverDal.FoundationData.ProductionData.ProductionLineDal.GetWarehouse() in G:647VS项目双英webDalEtrol.Web.SQLSeverDalFoundationDataProductionDataProductionLineDal.cs:300
       Etrol.Web.Bll.FoundationData.ProductionData.ProductionLineBll.GetWarehouse() in G:647VS项目双英webBllEtrol.Web.BllFoundationDataProductionDataProductionLineBll.cs:116
       Etrol.Web.ProductionFoundation.Controllers.ProductionLineController.GetWarehouse() in G:647VS项目双英webPluginsEtrol.Web.ProductionFoundationControllersProductionLineController.cs:189

    最后查询出问题:页面上绑定的model的字段是字符串类型的,但是对应的该字段在数据库中该字段是int型的。

    强制转换不成功导致此错误。

  • 相关阅读:
    6. (在第五步的基础上展开)实现模板推送发送
    5. (全局唯一接口调用凭据)获取Access token
    3. openid的获取
    2. 验证服务器地址的有效性
    Java后端开发规范
    4. (自定义菜单和删除全部菜单)Springboot读取静态json文件
    Docker私有仓库搭建与部署
    Docker容器基础学习一
    运维日志切割--logrotate
    zookeeper学习
  • 原文地址:https://www.cnblogs.com/abc8023/p/3580021.html
Copyright © 2020-2023  润新知