Can not obtain Oracle client information from...

Can not obtain Oracle client information from...

Postby TheGramix » Thu 12 May 2011 06:59

Hello guys,
I read all the posts but I did not find the solution.

My server is Windows 2008 R2 Standard, this is the enviroment path:
Path=C:\Oracle\11.2.0.2.0;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

if I try to check the path from command prompt I get the right value but not from a page, in that case I get only

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;

this is the code:

string path = Environment.GetEnvironmentVariable("PATH");
string[] envPaths = path.Split(';');

tbTest.Text += path + "\n\n";

bool found = false;

for (int i = 0; i < envPaths.Length; i++)
{
tbTest.Text += envPaths[i] + "\n";

if (File.Exists(Path.Combine(envPaths[i], "Oci.dll")))
{

found = true;

break;

}

}

if (!found)
tbTest.Text += "Can not obtain Oracle client information from registry. Check if Oracle client software installed.";
else
tbTest.Text += "FOUND IT!!!!";
// throw new Exception("Can not obtain Oracle client information from registry. Check if Oracle client software installed.");

Any idea?
TheGramix
 
Posts: 8
Joined: Fri 14 Jan 2011 06:14

Postby TheGramix » Thu 12 May 2011 07:34

I did the same test from a console application and I get the right path?!?

So the problem is on IIS7... How can I fix it? How can I allow IIS to get the right enviroment variables (system)?

Many thanks in advance!
TheGramix
 
Posts: 8
Joined: Fri 14 Jan 2011 06:14

Postby TheGramix » Thu 12 May 2011 08:05

Solution Found! :D

IIS7 depends on WAS... a restart of WAS solved the problem.

Have a nice day!
TheGramix
 
Posts: 8
Joined: Fri 14 Jan 2011 06:14


Return to dotConnect for Oracle