Can't run Classic ASP on IIS 7 Windows Server 2008 64 Bit - iis-7

We have a couple of web apps built in Classic ASP which are currently running on Windows Server 2003 32 Bit and IIS 6.
We are trying to migrate this to a new server running Windows Server 2008 64 Bit with IIS 7. But we are finding it very difficult to make Classic ASP work on IIS 7 in a 64 Bit OS.
I got to a tage where running the following code:
<%
Response.Write "This is the new www5"
Response.End
%>
Gives us an error on Response.End
This is the new www5 error '8002801d'
/test.asp, line 4
I have enabled 32bit Applications, also registered a few times asp.dll running regsvr32.exe but no luck so far.
Tried restaring IIS, recycling the application pool after each config change but nothing.
Thanks in advance.
Federico

In the end it turned out to be a permission issue on the registry.
I googled a bit more and found that 8002801d error means than a library is not registered or not properly registered.
I used procmon to monitor the access to the registry and found out that a key under HKCR\TypeLib was getting access denied.
Then i tried to run regedt32 to add the permissions for the IIS USR to that key, but was getting access denied as well.
So I downloaded PSTOOLS and run the following command: psexec -s -i regedt32
That opened regedt32 without having any access denied popups and added the IIS USR to that key.
After doing this Classic ASP is working on IIS 7 Windows Server 2008 64 Bit.
Cheers,
Federico

Do this Step by Step:
Go to control panel
Windows features on/off
Tick this features:
3.a) Internet Information Service>Web management tools>IIS6 Management Compatibility
3.b) Internet Information Service>Web management tools>IIS Management Console
3.c) Internet Information Service>Worldwide web services>Application dev. features>ASP
3.d) Internet Information Service>Worldwide web services>Application dev. features>ISAPI Extentions

To solve this issue you should change the application pool to "classic asp" in IIS settings and also change the application 64bit to 32bit.

Related

32-bit web app on 64-bit server 2003 is not running

We have a web application built with target framework as x86.
On Server 2008 (IIS 7/7.5) we are able to run the application without any issue (For 64 bit system we enable 32 bit application from app pool).
On 32 bit server 2003 - no issue.
On 64 bit server 2003 (SP2) - we are unable to load a dll:
Could not load file or assembly 'acPDFCreatorLib.Net' or one of its dependencies. An attempt was made to load a program with an incorrect format.
We know this error comes on 64 bit system when Enable 32bit application is set to false. So I tried the following:
Ran the script:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
The issue persisted.
%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -ir
On running this the World Wide Web Publishing service stops.
On trying to restart we are getting the following error
ISAPI Filter 'C:\WINDOWS\microsoft.net\Framework\v2.0.50727\aspnet_filter.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture.
Any ideas?
Below worked for me regarding the issue "Could not load file or assembly 'acPDFCreatorLib.Net' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Go to Application Pools => Select the AppPool you have created (Else Choose DefaultAppPool or ASP .Net v4.0)
Right click AppPool and Select Advanced Settings
Set Enable 32-bit Applications to True
Reset IIS and Check
The following fixed the issue for me:-
Right Click "Web Sites" and select property
Go to Services tab.
Uncheck - "Run WWW services in IIS 5.0 isolation mode".
After removing the selection from Run WWW Services...., I was able to start the service.

"Provider cannot be found. It may not be properly installed" using ORAOLEDB, IIS7, 32bit app, 64bit o/s

I have a classic ASP application which I've moved from a Windows 2003 server running IIS6.0 to 64-bit Windows 2008 R2 running IIS7. In IIS7 I've created a website and added an application to that and have set the application pool to enable 32-bit applications.
The application connects to an Oracle database using the ORAOLEDB driver - I've installed the 64-bit Oracle client 11.2.0.3 to connect to the backend Oracle 11g database and can connect fine via the same user as the application using SQLPlus.
When I run the application though, its attempt to connect to Oracle fails with the IIS logs showing the error:
"Provider cannot be found. It may not be properly installed"
I've tried various possible things to try and get this working:
registering OraOLEDB11.dll manually
disabling 32-bit applications from the app pool
using the 32-bit drivers instead both with 32-bits apps enabled and disabled
reinstalling the drivers completely and trying all the above
So far without any luck. The asp code connects as follows:
objOracleConnection.CursorLocation = adUseClient
objOracleConnection.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=MYDATASOURCE;User ID=USER;Password=PASSWORD;PLSQLRSet=1;OLE DB Services=-2;"
objOracleConnection.Open
EDIT: I've tried a simple VBS script (using essentially the same code as above) to connect and it gets the same error, so IIS may not be the problem. The exact same script works on the Windows 2003 box however.
I've reinstalled the Oracle client via the 'Troubleshoot Compatibility' option, indicating that the application works under Windows 2003 SP1 but still get the same issue from both the VBS script and the IIS application :(
This is an educated guess, but enabling 32 bit applications in IIS7 seems to disable 64 bit applications. If it's a 64 bit driver you may need to disable 32 bit in your app pool

Uploading picture after migration from IIS 6.0 to IIS 7.5

We've got a problem when trying to upload a picture to a IIS application after we've migrated from Windows Server 2003 & IIS 6.0 to Windows Server 2008 R2 & IIS 7.5 a couple of days ago.
You are allowed to choose a picture, but as soon as you click on the "Send"-button to perform the upload you're introduced to the following error message:
"
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/****/****/photouploadproc.asp, line 15
800401f3
"
In this code, the program uses a proprietary third library called w3upload.dll.
We tried to migrate the dll from the old IIS to the new one and give the access rights.
It's still not working.
We're close to the edge of insanity, so please, if anybody has any hints or tips we've will gladly accept it :)
I'd imagine your running in a 64bit application pool in IIS? you may need to set IIS to allow 32bit applications (dll's, com objects & assemblies etc).
Also, have you registered the dll using regsvr32?

VS2008 & Local IIS Web Server - all components installed, doesn't work

In VS2008, when checking the local server option in the web tab in the project window, the error message reads:
To access local IIS Web sites, you must install the following IIS components:
IIS 6 Metabase and IIS 6 Configuration Compatibilty
ASP.NET
Windows Authentication
In addition you must run Visual Studio in the context of an administrator account
The iis6 metabase, windows authentication and asp.net features are already installed. Also running VS as administrator. Using iis7, vs2008 32bit, vista ultimate 64 bit.
I tried installing the other iis6 features (scripts, console) and got an error got a useless message that told me nothing, but eventually found out that Vista doesn't support iis6.
Right now, am trying to uninstall the iis6 metabase and install it again.
Any ideas? Thanks.
Found the problem - had to start the web management service.
The Web Management Service enables remote and delegated management capabilities for administrators to manage for the Web server, sites and applications present on this machine.
Got help from here: http://forums.iis.net/t/1159087.aspx

User.IsInRole fails when using VS 2008's debugging web server on Windows 7 using Windows Auth

When the following line is called when running a website from the VS2008's web server i get a "The trust relationship between this workstation and the primary domain failed." exception.
if (User.IsInRole("SomeRole"))
...
I have turned UAC off, and set VS 2008, and it's built-in webserver, to run as an Administrator, and i have also rejoined my box to the domain. This code works fine if called from one of my Server 2003 boxes in IIS, and it always worked fine in Vista.
Any ideas on what may be causing this?
EDIT:
I just tried running it in IIS 7.5 on my local machine and i am getting the same error. Running it on Windows XP in IIS 5.1 and in the VS 2008 webserver works.
Have you tried running VS2008 as administrator?
This was a Win7/Server2008 R2 bug. The error only occurred when connected to a Windows 2000 domain.
Hotfix available from here
The built in web server is cassini, which is a rather limited web server. You may have discovered a feature cassini doesn't have-- maybe it can't do kerberos. Here is more discussion about what Cassini doesn't have.

Resources