Configuring IIS 7 to run on 32 bit - asp.net

I understand that the server can't run 32 bit and 64 bit apps concurrently, but I need to make use of the wkhtmltopdf utility which is only available as a 32 bit binary. If I "downgrade" my environment to 32 bit (ASP.NET app, IIS), what affect will this have on performance? Will it break anything?

".. the server can't run 32 bit and 64 bit apps concurrently"
You can have an application pool running in 32 and another in 64 bits in the same IIS instance.
https://help.webcontrolcenter.com/KB/a1114/how-to-enable-32-bit-application-pool-iis-7-dedicatedvps.aspx
Create a dedicated application pool to run this application, leave all other apps in 64 bits mode

Related

Running 32 bit application in 64 bit server?

We have developed a web application . It contains large amount of Data .So I need to enable 64 bit application in IIS application Pool (ie . Disable 32 bit application ). I have some regression due to enabling the 64 bit. I have added some dll with 32 pit application .Now its not running. Is there any solution to run 32 bit application in 64 bit application. Is there any work around process to resolve this regression.
advance in thanks
This is typical issue when you have to use 32-bit DLL in your project. The solution is dead simple - move 32-bit code out into separate process and communicate to it with any means you're familiar with. I prefer WCF with named pipe binding - the fastest option within the same machine.

How to run VS 2010 Local IIS in 32 bit mode

I have referenced some 32 bit and some 64 bit DLL in my ASP.NET MVC 3 project.
The projects compile but I get runtime errors.
It's because I am running the web project as 64 bit.
How do I "enable 32 bit" in my local IIS (just how I can do it in IIS 7.5 Pro)?
I am using .NET 4.0
The error I get is:
Retrieving the COM class factory for component with CLSID {A6775dfd2-1dfF-421C-A187-4D55F4DDFBFF} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
If you don't require the 64 bit component (not sure what is running there or if this can be excluded as you simply wanted to know how to run in 32 bit more)
http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/
You can set it at the server level via:
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true
Or set your particular app pool (more recommended imho) you can try the following. Sorry the page this came from is no longer seemingly active and only googles caches is showing it now:
Force IIS to create a 32-bit app pool worker process
If your application is running as a web app, meaning it is running in
an IIS app pool worker process, you’ll want that worker process
(w3wp.exe) to be a 32-bit process. That can be specified in the
advanced settings of the app pool:
Select the app pool for your web app. Click Advanced Settings… under
Edit Application Pool on the right. Change the value of Enable 32-Bit
Applications under (General) to True.
Note that the word “Enable” in the setting doesn’t mean “allow” as in
“allow either 32- or 64-bit applications.” It actually means “force”
as in “force the worker process to run in 32-bit mode so that 32-bit
applications are supported.” This means that the app pool worker
process will always be launched as a 32-bit process when this setting
has a value of True. Setting it to False will launch a 64-bit app
pool worker process.
Note that when an app pool worker process is started, it shows up in
the Image Name column on the Processes tab in Task Manager as
w3wp.exe. When the Enable 32-Bit Applications setting has a value of
True, it will be listed as w3wp.exe *32.
IIS Express 7.5 (as used by Visual Studio 2010 if you install it) is 32 bit only:
http://learn.iis.net/page.aspx/1265/iis-75-express-readme/
To quote:
Both 32-bit and 64-bit systems are supported, however only a 32-bit build of IIS 7.5 Express exists.
So I can't imagine that your problems would be related to the usual 32bit / 64bit pool mode issues that can arise if all of your DLL's are 32bit.
However if you're trying to load a 64 bit COM DLL then this will fail; 64 binaries can't be loaded into a 32 bit process and vice versa.
Another gotcha is forgetting to tick the Use IIS Express checkbox when choosing which web server to debug with:
If you don't tick that checkbox then you'll run your site in a child application in the DefaultWebSite on the version of IIS7 that ships with Windows.
The DefaultWebSite runs in the DefaultAppPool, which in 64 bit versions of Windows runs as a 64 bit process. So you need to change the DefaultAppPool to run as 32 bit if you want to use this instead and consume 32 bit binaries.
You need to do this using IIS7's MMC snap-in or by running the appcmd.exe tool from the command line.
Set your compile target to x86 instead of AnyCPU or x64. Your dll will always run in 32-bit without you needing to mess with the IIS server settings.

32 bit Access database 64 bit Win 7 dev-server

Win 7 Pro 64 bit, IIS 7, Access database (32bit) to be used with the web I am upgrading. Used odbcad32.exe and created DSN. Web site still does not access the database. I am thinking that the IIS 7 on a Win 7 64 bit system is 64 bit correct? I have turned on 32 bit Application Pool in IIS to true. Not sure what else to do, any help would be great.

Is it possible in Windows 7 64 bit to use 64 bit com dlls (in process servers) from a 32 bit exe application?

Is it possible in Windows 7 64 bit to use 64 bit com dlls (in process servers) from a 32 bit exe application?
I need to leave my VB6 gui application as 32 bit running on a windows 7 system but it has calls to com dlls (in process servers) and com exe's ( out of process servers).
My understanding is that it should have no problem with the com exe's the out of process servers.
I think the com dll in process server may have trouble since it is 64 bit but the application calling it is 32 bit.
Has anyone used a 64 bit com dll from a 32 bit application?
Thanks
A solution to this is discussed here:
https://stackoverflow.com/a/8484244/147637 (Read the whole post)
Years ago I used a 32bit DLL in a 16bit app. I don't remember how we did it (and the technique would surely not still be applicable), but this is generally called "thunking".
A quick Google would appear to indicate this can't be done in process, but I only scanned:
http://www.google.com/search?q=thunking+64bit+32bit+dll

IIS 7.5 , and out of memory exceptions

We recently migrated our 32 bit web application to 2008 Server R2 64 bit on IIS 7.5, with 8GB or RAM
Generally fine: some minor issues, but this afternoon we got a few out of memory exceptions.
I recyled the app pool, which resolved the issue. We didn't see this on IIS 6 / W2k3, so I'm digging around to see if we've lost some configuration.
Given the app is 32 bit, what should I set as the virtual and private memory limits to trigger app pool recycling?
I asked a related question here : 64 bit OS / 32 bit process
It seems the upper limit for the worker process is 2800 mb

Resources