I deployed an application to the server and started facing the below issue as soon as the application started.
Faulting application name: XYZ.exe, version: 1.0.3971.23259, time stamp: 0x4ce0e05e
Faulting module name: KERNELBASE.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdfe0
Exception code: 0xc000041d
Fault offset: 0x000000000000aa7d
Faulting process id: 0x178c
Faulting application start time: 0x01cbde4bf221ca06
Faulting application path: C:\zahir\XYZ.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: 30f4e993-4a3f-11e0-8406-000c295f3871
The server on which the application was deployed had Windows Server 2008 64 bit edition.
Resolution
The issue was due to incompatability between 32 bit application and 64 bit Operating System. For this to make work, I had to set the platform to Any CPU from x86 using Configuration Manager in Visual Studio.
The application worked fine after changing the configuration and building it.