Thursday, October 31, 2013

HOW TO RUN C# WINDOWS SERVICE IN 32-BIT MODE IN 64-BIT OPERATING SYSTEM

  1. Open Command prompt as 'Administrator'
  2. move to the path cd C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\CorFlags.exe
  3. then type the command CorFlags.exe /32BIT+ c:\yourpath\yourservice.exe
  4. above command force your windows service to run in 32-bit mode
  5. to stop running in 32-bit, run below command
  6. CorFlags.exe /32BIT- c:\yourpath\yourservice.exe
Note: Before running point 3 or 6, make sure that your windows service is stopped. CorFlags.exe may not be available in all Operating Systems. Copy/download this exe file from available location and place it anywhere in the server (effects to point2)

For more references, 
https://sites.google.com/site/kishorenetblog/asp-net/corflags-exe

Yours
Venkat