KevinGebhardt86

Server Library could not be loaded when connecting to SDE Workspace

Discussion created by KevinGebhardt86 on Dec 9, 2013
Hello,

I get the error message "Server library could not be loaded  at  ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactoryClass.OpenFromFile" when I try to open a connection to my SDE Workspace. I have ArcGISServer 10.0 an Oracle Client 11g installed.
The strange thing is that it worked until this week.
Here is my code:

//First check license
ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.Server);
IAoInitialize aoInitialize = new AoInitializeClass();  
esriLicenseStatus licenseStatus = esriLicenseStatus.esriLicenseAvailable;
//Check the productCode.
licenseStatus = aoInitialize.IsProductCodeAvailable
    (esriLicenseProductCode.esriLicenseProductCodeArcServer);
if (licenseStatus == esriLicenseStatus.esriLicenseAvailable)
{
       licenseStatus = aoInitialize.Initialize
       (esriLicenseProductCode.esriLicenseProductCodeArcServer);
}

//Then establish connection
IWorkspaceFactory workspaceFactory = null;
IPropertySet propertySet = new PropertySetClass();

propertySet.SetProperty("SERVER", "sampleserver");
propertySet.SetProperty("INSTANCE", "1234");
propertySet.SetProperty("DATABASE", "someDB");
propertySet.SetProperty("USER", "user");
propertySet.SetProperty("PASSWORD", "password");
propertySet.SetProperty("VERSION", "SDE.DEFAULT");

workspaceFactory = new SdeWorkspaceFactoryClass();
this.workspace = workspaceFactory.Open(propertySet, 0); // Here i get the error message

//I also tried this
//this.workspace = workspaceFactory.OpenFromFile("d:/wwwroot/GNSBaumSynchronize/gisora-vm01.sde", 0);

Outcomes