I am trying to setup my application so that ALL of the dependencies needed for my application are present in the bin directory, so no installation or configuration is needed on the server prior to application deployment.
I do not want to install oracle software
I do not want to copy instant client and modify PATH environment variable
All of the OCI dlls are included in my bin directory.
All Devart dlls are included in my bin directory
Is there a way, from config files in my application (or other means), to tell devart to find the necessary Oracle dlls in my bin directory?
I know the dlls present in my bin dir work because when i change PATH environment variable to point to bin directory, my application functions just fine. But i do not want to have to modify the PATH environment variable.
Thanks in advance!
OCI mode without install or instant client
Re: OCI mode without install or instant client
In the Windows system, the current path is a path by default. So instead of specifying the path to the Oracle Instant Client in the PATH system variable, you can just copy all the Oracle Instant Client files and directories to the bin directory (not to a subfolder, but to the same level with the app).
But perhaps the easiest way for you is using Direct Mode.
But perhaps the easiest way for you is using Direct Mode.
Re: OCI mode without install or instant client
Placing the oracle dlls in the bin directory did not work for me.
The application i am running is a .net framework web application hosted in IIS.
I tried both placing the dlls in the bin directory itself and the application root (1 level higher than bin folder)
Note: I was able to confirm that for a console application, placing the oracle dlls in the application root folder did work
Is there a reason why the same technique does not work with my IIS hosted site/services?
Keep in mind that the goal here is to deploy everything needed by the application within the application itself, so i would not have access to the location where IIS process executable is actually running, only my application folder and contents.
Thanks
The application i am running is a .net framework web application hosted in IIS.
I tried both placing the dlls in the bin directory itself and the application root (1 level higher than bin folder)
Note: I was able to confirm that for a console application, placing the oracle dlls in the application root folder did work
Is there a reason why the same technique does not work with my IIS hosted site/services?
Keep in mind that the goal here is to deploy everything needed by the application within the application itself, so i would not have access to the location where IIS process executable is actually running, only my application folder and contents.
Thanks
Re: OCI mode without install or instant client
I suppose the Oracle Client should be situated in the current directory of the server process, and it may differ from the bin folder.
Since you cannot change the value of system environment variables, you can try doing the following in your code before the opening Oracle connection:
Also, why don't you just use Direct Mode? For such a case, it is intended.
Since you cannot change the value of system environment variables, you can try doing the following in your code before the opening Oracle connection:
Code: Select all
System.Environment.SetEnvironmentVariable("PATH",
@"D:\PATH_TO_ORACLE_CLIENT;" + System.Environment.GetEnvironmentVariable("PATH"));