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 + "\n";
if (File.Exists(Path.Combine(envPaths, "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?