InvalidProgramException:公共语言运行时检测到无效程序 [英] InvalidProgramException: Common Language Runtime detected an invalid program

查看:36
本文介绍了InvalidProgramException:公共语言运行时检测到无效程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部,

我在部署 ASP.NET 4.0 网页时遇到了麻烦.错误是

I'm running into trouble deploying an ASP.NET 4.0 web page. The error is

System.InvalidProgramException:公共语言运行时检测到无效程序

System.InvalidProgramException: Common Language Runtime detected an invalid program

错误发生在 64 位 Windows Server 机器上的 IIS7 上.同一个页面适用于我的开发盒(32 位 Windows 7)和 Visual Studio 开发环境中的 IIS7.我不知道 IIS7 配置有什么不同.

The error occurs on IIS7 on a 64 bit Windows Server box. The same page works on IIS7 on my development box (32bit Windows 7) and in the Visual Studio Development Environment. I'm not aware of any differences in the IIS7 configuration.

我已经使用 PEVerify 来验证应用程序 bin 目录中的 dll.

I've used PEVerify to validate the dll's in the application's bin directory.

我可以通过使用实体框架查询来填充 DataGrid.DataSource 来重现该问题.这不是一个特别繁重的查询.

I can reproduce the problem by using an Entity Framework query to populate a DataGrid.DataSource. It is not a particularly heavy query.

关于什么可能导致这种情况的任何想法?我的下一步是尝试并简化使用的查询.

Any ideas on what could be causing this? My next step is to try and simply the queries used.

感谢您的帮助.

推荐答案

这看起来是由于类型为 decimal(1,0) 的主键造成的.

This looks like it's due to a primary key of type decimal(1,0).

这篇关于InvalidProgramException:公共语言运行时检测到无效程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆