Wednesday, September 14, 2011

Load 32bit assemblies on 64bit Azure Server(IIS) Machine.

Normally when we used to deploy the apps on azure server. If we have some old assembly which was build on 32bit environment then we used to get the Exception.
"Could not load file or assembly 'XXXXX' or one of its dependencies. An attempt was made to load a program with an incorrect format." as

The one solution is redeploy the whole project by changing the project platform to Any CPU Good blog post are here.

But there is one other way also there without redeploying the whole process which are as.

Step1.) Login to azure portal and open the Remote desktop of role which is causing the problem.
Step2.) Inside the azure machine open the IIS manager and Application Pool in the left Pane.
Step3.) Right click on the pool used by azure roles(Long guid kind of name) and select the Advanced Setting as:


Step4.) A New "Advanced Setting" window will appear. Under General tab Set "Enable 32-Bit Application" to TRUE. Press Ok and Done..


It will solve the your all 32-bit assembly problem on azure server.

Cheers!
Munish Bhargav

No comments:

Post a Comment