Monday, November 02, 2009

Getting IIS6 working in 32bit mode on a 64bit machine

I had a server up and running hosting various sites.  One of those sites needed to be able to apply DRM wrapping to movies (WMV) files.

Unfortunately the DRM libraries are only available in 32bit versions and it's not possible to call 32bit DLLs from 64 bit processes.  The way round this is to have IIS run in 32 bit mode.

The same applies if  needing to reference any other 32 bit DLLs ffrom 64 bit ASP.NET/IIS.

Based on what I read on the internets, making this change should be quite straight forward.  Despite all the instructions on the web saying ti was just one script to run to make this change I found that more needed to be done.  Incase anyone else has the same problem, here's what I did to get it working.

Uninstall the 64bit version of ASP.NET 2.0.
c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -u

Configure IIS to run in WOW64 mode.
cscript.exe C:\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

Install 32bit version of ASP.NET 2.0
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

Enable 32bit version of ASP.NET 2.0 in IIS WebService Extensions

Recreate the existing websites in IIS using same setings as before.  This will use the 32bit versions of ISAPI extension executables, etc.  I tried changing these manually but that didn't seem to be enough.  I assume that there's more to change than I'm aware of. Recreating the web site takes care of all that for me.

Done.


IIS is all or nothing when it comes to using the 32 or 64 bit version.  Yes this meant that all websites on that server needed to be changed to run at 32 bit.  We therefore lose the benefits of the 64bit OS.  If the site becomes as big as the client is hoping we'll move the site doing the DRM wrapping to a different box and put everything back to 64bit so we can make the most of the 12GB of memory installed.

3 comments:

  1. thanks for the tips, I never knew the 32 vs 64 bit problem would affect us poor developers.

    ReplyDelete
  2. atlanta falcons, http://www.atlantafalconsjersey.us/
    michael kors outlet online, http://www.michaelkorsusa.us/
    mbt sneakers, http://www.mbtshoesoutlet.us.com/
    dallas cowboys, http://www.dallascowboysjersey.us/
    oklahoma city thunder, http://www.thunderjerseystore.com/
    san francisco 49ers, http://www.sanfrancisco49ersjerseys.us/
    cheap uggs, http://www.uggsale.in.net/
    polo ralph lauren uk, http://www.ralphlauren-outletonline.co.uk/
    chicago bulls, http://www.chicagobullsjerseys.net/
    babyliss hair dryer, http://www.babyliss.us.com/
    supra sneakershttp://www.suprashoes.us.com
    ray ban sunglasses, http://www.ray-bansunglasses.eu.com/
    toms shoes outlet online, http://www.toms.us.com/
    snapback hats, http://www.cheapsnapbacks.us.com/
    fitflop sandals, http://www.fitflop.in.net/
    louis vuitton outlet,louis vuitton outlet online,louis vuitton,louisvuitton.com,authentic louis vuitton,louis vuitton factory outlet,cheap louis vuitton
    ralph lauren sale, http://www.ralphlaurenoutlet.in.net/
    oakley outlet online, http://www.oakleyoutlet.in.net/
    kkk10 13

    ReplyDelete