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

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

Related

Writes to database seem to have no effect

I am working with an ASP.NET web application written in C# deployed to IIS/Windows Server 2008 R2. The application uses NHibernate to interact with an Oracle database running on a networked unix server.
It seems that writes being made by the application to the database have no effect.
If I manually edit the value of a record in the Oracle database, the new value is reflected by the application. However, if I attempt to change a value using the application’s custom “save” functionality, the changes are not reflected in the database. It seems like reads are succeeding, but writes are failing.
Why do writes seem to be failing?
More information:
No obvious error messages are received (ie. the application does not throw an exception and it seems to continue running as if everything is fine).
Another instance of this application is running on IIS/Windows Server 2003. This instance can write to the Oracle database (ie. the changes can immediately be seen in the database by using a database viewer after clicking “save”).
The code is virtually identical between the 2003/2008 applications. However, on the 2008 server, I am using newer versions of Oracle libraries and I changed to target architecture of the visual studio projects from ‘Any CPU’ to ‘x86’ (the 2008 server is 64-bit while the 2003 server is 32-bit).
Disclaimer:
I have very limited experience working with IIS, NHibernate, Oracle databases, Windows Server 2003, and Windows Server 2008 R2. I do, however, have slightly more experience working with C#, ASP.NET web applications, Visual Studio, and MSSQL databases).
I solved it.
It turns out one of the HttpModules was not being initialized. This was because the web.config file was tuned to IIS6, and the application was running in an application pool set to Integrated Pipeline mode on IIS7. Switching the application pool to Classic mode essentially enabled backwards compatibility.
Anyways, here is the resource that helped me figure it out: httpModules not working on iis7

"ORA-03134: Connections to this server version are no longer supported."

I am trying to understand why the same C# Oracle access code works under VS2010 environment but not under IIS.
I am building a web service to access Oracle 9.2 database on the remote machine. The web service must be hosted in the IIS under Windows 2003 machine. The same machine is hosting Oracle 9.2 database.
The web service must be compiled for x86 CPU because of Windows 2003 that is 32-bit architecture.
My Visual Studio project is WCF Application.
When I run the service under ASP.NET Development Server everything works fine. The database is connected and all CRUD operations are possible.
When I deploy everything under IIS on my machine or any other machine the I am getting "ORA-03134: Connections to this server version are no longer supported." at the time of connecting.
I supposed it is some kind of permission problem so I run the service under special Application Pool with LocalSystem account. I even gave to the Oracle client folder installed on my machine Full Control permissions for IIS users but this should not be needed because of LocalSystem account.
Anyway I tried and nothing. It is always the same error.
What could be the reason ?

Error Retrieving the COM class factory for component

I have a web service which loads a 32-bit COM component. I am running this web service with IIS server in my local machine.
When I load the the test page from Visual Studio it succeeds, on the other hand, while loading it using IIS, it display following error
Retrieving the COM class factory for component XXX failed due to the following error: 80070005.
I tried changing the webservice's platform to x86 from Any CPU but that dint help. I am running this on Windows Server 2008 R2 - 64 bit.
I had to enable the 32-bit Applications from the Application Pools settings.
Check permissions on that COM. It may be that when you're running tests from VS, you're running as you (admin), while the user running the website's app-pool is totally different. That user needs to be added read+execute (or, activate, whatever) permissions for "local".
Maybe also see this: Retrieving the COM class factory for component error while generating word document
Sarat, this cannot be right. The "Enable 32-bit Applications" under Application Pools Defaults is not for running 32-bit applications or to solve your problem. It is there to enforce running 32-bit applications UNDER 32-bit processes only, which is not necessary in this case. Most 32-bit applications run fine on 64-bit processes. That's why you can run MS Office 2010 (which is still a 32-bit application) on Windows 7 64-bit machines.
You must have other settings tried and true after nearly a full year answering the original problem.

MSDAORA provider not found for asp.net site

I've got stuck with strange Oracle connection error on Windows Server 2003 x64 (IIS 6)
While console .Net application that runs onbehalf of administrator successfully connects to Oracle 10g Express via OleDb [Connection string looks like: Provider=MSDAORA;Data Source=server-ip:port;User Id=user;Password=password;]
ASP.NET 4.0 web-site (application pool runs on behalf of administrator too) fails with error:
The 'MSDAORA' provider is not registered on the local machine
Connection string is the same, but it doesn't work for asp.net site. What shall I check?
Thank you in advance!
This Social.MSDN link seems to point to the fact that you have x86 drivers installed;
From my viewpoint you have two options:
Convert the app to run on 32bit mode in IIS - Can help if you require assistance. LINK
Download and try the 64bit version of the drivers. Oracle x64 downloads
Another approach would be to enable 32-bit applications for the IIS Application Pool your application is using. I would suggest creating a new application pool specifically for your application making sure to enable 32-bit applications.
You'll likely suffer performance issues but at least you'll be up and running.
I have resolved this issue in one of my applications with ASP(MSDAORA connection) - oracle environment with following fix from
http://technet.microsoft.com/en-us/library/cc784046.aspx
following are the steps
To enable IIS 6.0 to run 32-bit applications on 64-bit Windows
1.Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.
2.Type the following command:
cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 true
3.Press ENTER.

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

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.

Resources