asp.netiis-764-bitasp.net-4.0

InvalidProgramException: Common Language Runtime detected an invalid program


All,

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

System.InvalidProgramException: Common Language Runtime detected an invalid program

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.

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

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.

Thanks for any help.


Solution

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