I’m trying to install a 32-bit ASP.NET application onto a 64-bit IIS server running on Windows Server 2008. This is a clean installation of the operating system with no other applications installed.
As a prerequisite for our installation, we run the 32-bit version of aspnet_regiis –i
It fails with the following message:
The error indicates that IIS is not installed on the machine. Please install IIS before using this tool.
Additionally:
IIS is definitely installed.
The 64 bit version of aspnet_regiis runs cleanly without warnings.
“Enable 32 bit applications” is set to True in the DefaultAppPool’s Advanced Settings.
The IIS Metabase and IIS 6 configuration compatibility” component is installed.
We have a test VM where this error occurs as well as test VM where both the 32 bit and 64 bit versions of aspnet_regiis run without errors. We've had no luck distinguishing the differences between the two test VMs.
We have struggled with this issue for several days to no avail. Any suggestions would be greatly appreciated!
Is it necessary to run aspnet_regiis? 32 bit asp.net should already be installed and running on iis7, all you should need to do is set the app pool to “Enable 32 bit applications” and set you web app to use that app pool. You do not say what happens when you install/setup your web app, do you get any errors when you try to access it in a browser?
Problem solved! Apparently the issue stems from Windows Server 2008 (R1). Applying the SP2 update to the operating system cures the problem. Later iterations of the OS don't seem to exhibit this behavior.
Related
I have a legacy classic ASP website that I need to do some maintenance work on. My development machine is running Windows 7 64 bit, Visual Studio 2012 and IIS Express 8.0.
The ASP app is backed by a Microsoft Access database.
The website runs fine until it tries to establish a connection to the database, where it fails with the following:
0x800a0e7a - ADODB.Connection: Provider cannot be found. It may not be
properly installed.
If the ASP process is running as 64-bit and it is trying to use the Jet database engine then that won't work because there is no 64-bit version of Jet. If that is the case then you can either
install the 64-bit version of the Access Database Engine (ACE), available here, and tweak the connection parameters as required, or
get the ASP process to run as 32-bit
I had the same problem you mention in a follow up comment.
I tried to install the 64 bit version, but I could not because I have
Office 2010 32 bit installed.
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
My task is simple: I need to test my ASP.NET web application in a 64-bit environment on my development machine. (At this point I don't even ask about running it through a debugger. All I need is to run it in a 64-bit process.)
So I created a stock C# Web Application in Visual Studio 2010 and adjusted its properties as such:
I then did Ctrl+F5 (or run without debugging) and IE loaded up and hangs up like so:
What am I doing wrong here?
PS. Running it on Windows 7 Ultimate (64-bit).
We had the same problem and when the team jumped to Visual Studio 2012, this registry key was really useful to us :
you can add a registry key to force visual studio to use the 64 bits version of iisexpress.exe ; unfortunately for you, it is a VS2012-only solution.
reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\WebProjects
/v Use64BitIISExpress /t REG_DWORD /d 1
Then restart Visual Studio and tick [X] Use IIS Express in your settings.
(see also the source).
UPDATE: For reference, in Visual 2013, this option can be found in the interface : Options/Projects and Solutions/Web Projects/Use the 64 bit version of IIS Express for web sites and projects
In IIS make sure the Application Pool, Advance Settings, Enable 32-Bit Applications = false
If this setting is true then the worker process will run as 32bit WOW64 process.
Chris
No settings required in project or solution level. I am developing WebApp on VS2010 on 32 bit and 64-bit machines simultaneously. Actually We are working on SVN and our few machines have Win7 32-bit and my few mates have Win7-64bit laptops. But there we haven't faced any such issue while compiling the app on two different machines and Even on the live server, it runs butter smooth. Hardly care about the bit and bytes.
To verify a test run. Publish your code and host in your local IIS or Cassini Webserver and access it over LAN.
Also if possible revert back solution and project settings to its original configuration settings. Generally, We do not need to change target until and unless it is strictly required. As, AFAIK, It compiles the assembly under "Any CPU" as target, which is eligible for all i.e. IA, X64 and X86..
Finally, if you are coming across any error, please do post it here. It will help you and us as well.
First of all how to do you know if your IIS process is running your website as 32-bit or 64-bit as of now?
Open Task manager to check the bitness of w3wp.exe. If your machine is 64-bit then IIS will run 64-bit by default. Your problem seems to be something else. If bitness is the issue then you won't even come this far. Check IIS logs (c:\inetpub\logs{website-ID}{date})... that might give you some pointers. If there is nothing in there, check event viewer. If nothing then check if the virtual directory is actually created in IIS Manager under Default Web Site.
Have you actually tested if IIS (sans ASPX) is functional? http:// localhost ? does that work? if that is working then I would recommend checking if your ASP.NET modules are properly installed within IIS.
Hope this Helps.
Using Win7 32-bit for 3 months and didn't have problem with developing any .NET-based applications including ASP.NET apps.
Just upgraded my laptop's RAM 3 days ago and switched to 64-bit version of Win7.
When I'm working on installing IIS7 and .NET Framework 3.5 SP1, there's an error about not all features were installed for some unknown reason.
When I try to register ASP.NET using aspnet_regiis -ir in c:\Windows\Microsft.NET\Framework64\v2.0.50727\, a dialog box shows with this error message:
"Operation failed with 0x80070643" and after I close the dialog box, another error message on the console command shows with this message: "An error has occurred: 0x80004005 Unspecified error".
I had the same problem and I did everything found on the internet but nothing was useful
eventually I was able to solve it by using the following:
note: do it on your own risk
Add the following to you registry only if the doesn't exist (in my case they didn't exist):
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_2.0.50727]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_2.0.50727\Names]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_2.0.50727\Performance]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64\Names]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64\Performance]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64_2.0.50727]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64_2.0.50727\Names]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64_2.0.50727\Performance]
try installing asp.net 64 bit after that
Configure IIS to run in 32 bit mode (assuming your apps are 32 bit mode, since that's what you originally developed on).
http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/
Try running aspnet_regiis after that is done. Use the 32 bit version of aspnet_regiis.
I know this is a fairly old post, but I thought I'd share what I did to solve this problem on my machine running Windows 7 64-bit.
While IIS was installed on my computer, the ASP.NET features were not enabled.
To enable ASP.NET do the following:
Navigate to the Turn Windows features on or off dialog. It's located under
Control Panel --> Programs and Features.
Note: Typing 'features' in the Start Menu search will also get you there.
When the Turn Windows features on or off dialog appears, navigate to World Wide Web Services --> Application Development Features
and make sure ASP.NET is checked.
Once this was done the aspnet_regiis -ir command worked perfectly and I could run and debug ASP.NET apps on my machine.
Hope this helps.
set IIS to run in 32 bit mode
http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/
Try running aspnet_regiis after that is done. Use the 32 bit version of aspnet_regiis.
بریده جراید
I've run into a problem after installing the 64 bit Oracle client onto my Win 7 x64 dev box. I have installed and configured the oracle client and added a reference to it in my library project and it runs without problems when deployed to a Win 2008 R2 server; however I cannot run it in the built-in VS2010 debugger.
The code throws a BadImageFormatException when the .open() statement is called on the connection object.
I figured out that if I will run it in IIS and move the application out of the default application pool, the error goes away for some reason.
However, I can't do this when I'm running the test project (MSTest) and I the result is that I cannot run unit tests against this code. Yes, I can mock it, but I would really like to understand and eliminate this error. There are several cases where I would like to test against some test data in the database.
Any suggestions or links would be greatly appreciated.
Thanks,
Trey Carroll
Here's the answer according to senior dev in my group VS is a 32 bit application so running things in Casini is of course from a 32bit context. When the 32bit Web Appattempts to use the 64bit Oracle Client, it causes the BadImageFormatException. (Apparently deploying to IIS is allowing the Web App to run as a 64bit app and eliminating the conflict.)
So here's the question: How do I run MSTEST unit tests from VS when there are dependencies on 64bit dll's? I could obtain 32bit versions of these, but how would I tell my application to use the 32bit versions for testing/Casini debugging and the 64bit versions otherwise?
I'm trying to get a new DotNetNuke site up and running on our 64-bit server, and I'm encountering the following error message:
"The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine"
I know from experience that you run into this when you target a 64-bit assembly on a 64-bit machine (there is no 64 bit OLE-DB provider currently). In that case, I simply target the x86 in Visual Studio and everything works fine.
But in this case, the site uses dynamic compilation, so there's no simple place to specify that I need to target x86. Any thoughts?
TIA.
You could change your app pool that you're running that site under to run as a 32 bit application. In the IIS7 manager, its under "Advanced Settings" of your app pool, and then set "Enable 32-bit Applications" to true.
You could also do this with AppCmd from a console with the following:
appcmd apppool set /apppool.name:MyNukeSite /enable32BitAppOnWin64:true
In IIS6 - you could try something like this (2 lines here, run aspnet_regiis when finished changing the metabase value)...
cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1
aspnet_regiis.exe -i
See the following for more info:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5d306956-b2a2-4708-9bb9-72a395d474bb.mspx?mfr=true
http://blogs.msdn.com/irfanahm/archive/2008/12/15/how-to-use-a-32-bit-dll-in-asp-net-page-which-is-hosted-on-64-bit-iis.aspx
http://support.microsoft.com/kb/895976
HI, Now the Microsoft has released the 2010 Office System Driver Beta: Data Connectivity Components which is supported both in 32 bit as well as 64 bit OS. So using this driver instead of the traditional Microsoft.Jet.OLEDB.4.0 driver will give us a 64 bit application running on a 64 bit server (that is what we really need).
Though this is in beta, it worked fine for me.
You can download this driver from 2010 Office System Driver Beta: Data Connectivity Components
Thnks
You shouldn't try to target your application to 32-bit in which case you are losing the advantages of using 64-bit system. As aaa has pointed out, you can use the latest Access Database Engine 2010 to address this issue. Please refer to my blog post for complete solution.
Hope it helps.