Unobtrusive Oracle Deployment on Windows Server 2008

三世轮回 提交于 2020-01-04 11:46:09

问题


I have a .NET 4.0 Web Forms app that I am running with the beta Oracle EF-aware data provider, and I want to perform "unobtrusive" Oracle deployment to a Win2K8 box, as shown in many SO solutions.

There is an existing Oracle Instant Client installation on the Win2K8 box, which I can neither work with nor remove, and it has an entry in the PATH environment variable on the Win2K8 box. According to this SO answer, I do not need to set PATH for my Oracle DLLs, since I have DllPath set in the web.config.

I am following the procedure from here, yet I still get the provider is not compatible with the version of Oracle client error.

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

Oracle DLLs are in my web app's bin directory, and set to Copy Always Do Not Copy.

Platform and Platform Target settings are set to x86 in my local Build Configuration.

32-bit applications are enabled in the app pool (.NET 4.0) on the Win2K8 box.

Oracle DLLs are not present in the GAC, not are they present in the GAC_32 and GAC_64 directories on the Win2K8 box.

My web.config (but not my Win2K8 machine.config) contains this:

<configuration>

    <configSections>
        <section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    </configSections>

    <oracle.dataaccess.client>
        <settings>
            <add name="DllPath" value="C:\inetpub\wwwroot\myapp\bin"></add>
            <add name="FetchSize" value="65536"></add>
            <add name="StatementCacheSize" value="10"></add>
            <add name="TraceFileName" value="c:\temp\odpnet2.log"></add>
            <add name="TraceLevel" value="0"></add>
            <add name="TraceOption" value="0"></add>
        </settings>
    </oracle.dataaccess.client>

    <system.data>
        <!-- Version=4.112.2.50 -->
        <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.2.50, Culture=neutral, PublicKeyToken=89b483f429c47342" />
        </DbProviderFactories>
    </system.data>

    <connectionStrings>
        <add name="MyEntities" connectionString="metadata=res://*/MyModel.csdl|res://*/MyModel.ssdl|res://*/MyModel.msl;provider=Oracle.DataAccess.Client;provider connection string=&quot;DATA SOURCE=**<using EZCONNECT format here>**" providerName="System.Data.EntityClient" />
    </connectionStrings>

<configuration>

The app itself deploys successfully, and I can run pages that do not reference my Oracle DLLs. But, for those that do reference Oracle, I still get the provider compatibility error.

What am I missing?

Thanks again for the help.

UPDATE: The web app runs on the Win2K8 target with .NET 4.0, EF4.1, and the Oracle EF Provider, completely separate from the other active ODAC install. No PATH variable, no installation from Universal Installer, no Oracle DLLs in GAC.


回答1:


Case closed. I was missing an Oracle DLL.



来源:https://stackoverflow.com/questions/8543314/unobtrusive-oracle-deployment-on-windows-server-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!