An Attempt Was Made To Load A Program - What Is The Reason?
> You will get this error when you run a 32 bit application on 64 Bit IIS.
> In your application, if any of the dll is of 32 bit, you can expect this error.
> In 64 bit IIS, if you allow to run 32 bit application, you can resolve this issue.
> Else make your application compatible to run on any Operating System.
An Attempt Was Made To Load A Program - How To Resolve This Issue?
> For resolving this issue follow these steps.
> 1. Enable 32 bit application on IIS.
> 2. The Target Platform of your app should be compatible with where you deploy.
> Lets consider each of them in detail.
1. Enable 32 Bit Application On IIS
> First of all open your IIS. (On Run type
inetmgr).
> Select your Website. Click on Advanced Settings.
> Note down your Application Pool under General Tab.
> Now from list of Application Pool, Right Click on your Application Pool.
> Select Advanced Settings.
> Under General Tab Section, make
Enable 32-bit Applications set to True.

> Now press OK Button.
> Refresh your Application to see whether the Issue is resolved or not.
> Else follow second step.
2. Change Target Platform Of Your Application
> Right click on your Project Icon and select Properties.
> Under Build Tab, make sure on which
Configuration you are going to Publish.
> If final publish is on Release mode, select Release. Or select appropriate mode.
> After selecting configuration, select
Platform target from
Any CPU to x86.

> Now Save the changes and Rebuild the Solution.
> Publish the Application to see the End Result.
Watch Video of this Content on Video Streaming