MSDAORA provider not found for asp.net site - asp.net

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.

Related

"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 ?

"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

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.

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.

Why is IIS not serving aspx pages?

I'm deploying an ASP.NET application to Windows Server 2003 under IIS
IIS is serving html pages fine but I get a page not found when I try and serve IIS pages
You may need to "register" IIS for ASP.NET applications. As an administrator, run the command "%systemroot%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i". In addition, you may need to convert your web site to an application through the IIS management console.
By default, IIS has ASP support disabled in IIS6.
A server running a member of the Microsoft® Windows® Server 2003 family supports application server functionality, with Microsoft ASP.NET as an option that you can enable when configuring the application server role. To deploy ASP.NET Web applications to a production server, you must be sure to enable the ASP.NET and Internet Information Services (IIS) roles on the production server before you distribute the application.
See here for instructions to enable it:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/9fc367dd-5830-4ba3-a3c9-f84aa08edffa.mspx?mfr=true
Other possible reason could be Web Service Extensions, where ASP.NET version could have been disabled. My other post here explains steps to solve this.
Make sure the right .NET framework is installed properly
Make sure the ASP.NET extension is enabled
Under website properties, ASP.NET tab, make sure the right version is set.
After having this same issue and trying all of the above without any luck. We reinstalled SP2 for Windows 2003 and this resolved our issue. I too have seen this problem resolved a few times with the other answers. Most of the time just reinstalling .Net 2.0 resolves the issue but not this time.
For future reference, this could also be the issue:
IIS on a Windows Server 64-bit can only to run in either 32 or 64 bit mode.
In short you need to:
1) run adsutil.vbs to enable 32 bit asp.net apps on win 64
2) re-register IIS calling aspnet_regiis.exe
3) re-open IIS Manager, go into Web service extension list and ensure ASP.Net version {2/4.xxx} (32-bit) is set to Allowed
(You might need to do Steps 2 and 3 for both Framework 2.0 and 4.0 if you want to run asp.net apps on both versions)
Full details are in the following link: http://support.microsoft.com/kb/894435
Another future reference in case this is helpful to anyone who used a similar path to mine.
My back end for the ASP.NET app was MySql not Sql Server, which for me meant having a mysql connector, the reason my IIS was not serving the .aspx file is because on my development environment I was using a different version of the MySql connector than the one installed on my production environment, I updated the MySql connector on the production server to match the version Im using on the development environment and it worked great.

Resources