Search code examples
c#asp.netwindows-864-bitasp.net-2.0

The type initializer for '<Module>' threw an exception and Arithmetic operation resulted in an overflow


The same code runs in Windows 7 32 bit. But fails in windows 8 64 bit. Any ideas? Thanks enter image description here


Solution

  • I just resolved it. This application requires 32-bit mode where as the IIS in my Windows 8 machine runs in 64-bit mode by default. I had to set Enable 32-bit Applications to true for the AppPool this application is using.

    and it was not failing on a specific line of code. The exception was thrown somewhere between Application_BeginRequest and Session_Start