Hi,
I'm developing a SOE to open a connection to a specific workspace using IWorkspaceFactory. I'm using a PostgreSQL geodatabase. Below is my code:
IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(Type.GetTypeFromProgID("esriDataSourcesGDB.SdeWorkspaceFactory"));
IPropertySet propertySet = new PropertySetClass();
propertySet.SetProperty("SERVER", "vmsql201764.nco.inet");
propertySet.SetProperty("INSTANCE", "vmsql201764.nco.inet");
propertySet.SetProperty("DATABASE", "sde");
propertySet.SetProperty("USER", "sde");
propertySet.SetProperty("PASSWORD", sdePassword);
propertySet.SetProperty("AUTHENTICATION_MODE", "DBMS");
propertySet.SetProperty("VERSION", versionName);
IWorkspace workspace = workspaceFactory.Open(propertySet, 0);
It throws an Exception with message: "This operation is not allowed".
Any idea? Thank you.
Regards,
Mario Petta