Question

I have an ASP.NET Web Forms app that I am building and running against .NET 4.0 on a Win7 local machine. (All is OK on local box.) My app is running EF4.1 against an Oracle DB, so I am using the Oracle EF data provider, which is still in Beta.

Right now, I can successfully deploy the app to my Win2008 Server target machine using Web Deploy from my local VS2010, but when I run the app on the target, I get the classic Unable to find the requested .Net Framework Data Provider error.

Here's my (unsuccessful) setup, as of now:

  • 32-bit applications are enabled in the app pool (.NET 4.0) on the Win2008 Server target.

  • Copy Local is set to true for the Oracle.DataAccess DLL in my local VS2010 solution.

  • Both of the Platform and Platform target settings are set to Any CPU in my local Build Configuration. (I have tried different settings here without success.)

  • The Win2008 Server target does not have an Oracle.DataAccess DLL in the GAC. (I thought that setting Copy Local on the Oracle DLL would mean that I didn't need the GAC.)

EDIT: I have tried to GAC the Oracle.DataAccess DLL, but I get the same error that is discussed here. (I still have to investigate this.) Also, there is already another Oracle client on my target box, and installing the Oracle client that comes with the Oracle EF data provider seems to interfere with it. This cannot be allowed to happen.

Question 1: What combination of build configuration settings (on the local box) and IIS settings (on the target) do I need to select in order to be able to run my app on the 2008 Server?

Question 2: How can I get this to work without installing another Oracle client on my target server?

Thanks again for the help.

Update: All is working. See my answer below for a link to the full solution, as well as links to helpful information.

Was it helpful?

Solution 2

GTG's solution provides at least part of the answer to my Question 1, so I am upvoting his solution. For anyone else interested in my Question 2 (how to perform an unobtrusive ODAC installation), an answer can be found here. (Look for AnthonyVO's answer, as it encapsulates all the necessary information.)

I should mention that I have not yet been able to get the unobtrusive solution to work for me, but many have, and it is the solution that I need to implement.

UPDATE: Case closed. I was missing an Oracle DLL. My full setup is shown here.

OTHER TIPS

Since your server doesn't have Oracle.DataAccess in the GAC, that indicates that you haven't installed the Oracle client on that machine and are trying to make it work by deploying Oracle.DataAccess.dll as part of your app.

I'm not quite sure exactly what needs to be installed on the server. I usually just run the Oracle setup on the server to ensure that all the necessary Oracle files and settings get installed. If you do that, you don't need to deploy Oracle.DataAccess.dll along with your app, it will already be in the server's GAC.

One thing I do know is needed is a config setting that tells the system how to create a new instance of the provider. You can try to add that setting to your web.config and try if that is enough, but again, there may be a lot of dependent DLLs and settings you need for the Oracle provider to work.

The setting is (this is for another version of ODP.Net, you will find the correct settings in machine.config on your own machine):

<system.data>
  <DbProviderFactories>
     <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client"
          description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.112.1.2, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</DbProviderFactories>
</system.data>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top