66

I have a classic ASP app that I'm trying to run under IIS Express on 64 bit Windows. It uses Jet to connect to a Microsoft Access database and will not work under 64 bit.

I have created the following application pool for the ASP app, but it seems to ignore the enable32BitAppOnWin64 attribute and the process is still 64 bit.

<applicationPools>
    <add name="UnmanagedClassicAppPool32" managedRuntimeVersion="" managedPipelineMode="Classic" autoStart="true" enable32BitAppOnWin64="true" />
</applicationPools>

How can I get this app pool in IIS Express to run as a 32 bit process?

5 Answers 5

154

For Visual Studio 2013, Visual Studio 2015, Visual Studio 2017, Visual Studio 2019, Visual Studio 2022:

 Tools
  -> Options
   -> Projects and Solutions
    -> Web Projects
     -> Uncheck "Use the 64 bit version of IIS Express for web sites and projects"`
7
  • 3
    These directions hold true for Visual Studio 2015 as well!
    – Jim Buck
    Oct 8, 2015 at 15:18
  • 12
    This works globally. Is there a way to do this per-project?
    – arni
    Aug 10, 2016 at 8:30
  • 12
    I had the opposite problem, this was unchecked and I was trying to run a 64-bit project. Checking it fixed the issue. Thanks!
    – Andacious
    Nov 22, 2016 at 17:46
  • 2
    True for Visual Studio 2017
    – Dimskiy
    Jul 24, 2017 at 16:49
  • 6
    works also for vs2022
    – Noam
    Jan 16, 2022 at 15:14
45

According to this, IIS Express 7.5 comes only as a 32 bit application. IIS Express 8.0 however, comes with both 32 bit and 64 bit versions of the application. The 32 bit version can be found at c:\program files (x86)\IIS Express\iisexpress.exe and the 64 bit version can be found at c:\program files\IIS Express\iisexpress.exe.

IIS Express ignores the enable32BitAppOnWin64 attribute. To run the app pool as 32 bit, you must execute the 32 bit version of IIS Express.

You can determine which version is running in Task Manager by examining the process on the Processes tab. The 64 bit version will be displayed as iisexpress.exe and the 32 bit version will be displayed as iisexpress.exe *32.

2
  • 2
    Good advice, was trying to fix a build on our build server after an upgrade for a full day yesterday and the change from IIS 7.5-8 was the issue.
    – jcvandan
    May 21, 2013 at 8:44
  • 1
    Use the following command, which uses a junction to force IISExpress to use the 32-bit version: mklink /j "c:\program files\IIS Express\" "c:\program files (x86)\IIS Express\"
    – Banoona
    Nov 18, 2014 at 17:29
10

Add <Use64BitIISExpress>false</Use64BitIISExpress> under the <PropertyGroup> tag of your csproj project.

It's also available through the UI by clicking on project properties -> Web tab -> Bitness (change to x64).

2

In IIS Express property window of VS studio, change the first option: 'Managed Application Pool' from 'Integrated' to 'Classic'

1

Are you sure?

It uses Jet to connect to a Microsoft Access database and will not work under 64 bit.

I had the same problem and eventually solved it by forcing the 64 bit drivers to install. Initially that failed because of an error that you can't install the 64 bit drivers if you have Office 2010 32 bit installed.

But ... you can force the 64 bit version of the Access Database Engine (ACE) from here to install with the 'passive' switch:

AccessDatabaseEngine_x64.exe /passive

And then I was able to run my legacy code with my current development environment.

Not the answer you're looking for? Browse other questions tagged or ask your own question.