AnsweredAssumed Answered

Operation not allowed

Question asked by Nadir_Hussain on Oct 13, 2019
Latest reply on Jul 20, 2020 by Nadir_Hussain

i am writing a webapi.on my devlopment pc  the below code is working fine


Console.WriteLine("Ready with license.");
if (ESRI.ArcGIS.RuntimeManager.ActiveRuntime == null)
IPropertySet propertySet = new PropertySet();
propertySet.SetProperty("SERVER", "myServer");
propertySet.SetProperty("INSTANCE", "5151");
propertySet.SetProperty("DATABASE", "SDE");
propertySet.SetProperty("USER", "sa");
propertySet.SetProperty("PASSWORD", "ds");
propertySet.SetProperty("Authentication_mode", "DBMS");
propertySet.SetProperty("VERSION", "SDE.DEFAULT");
IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactory();
workspace = workspaceFactory.Open(propertySet,0);
return workspace;

and i can perform all opations.


when i publish webapi in production server i am getting this error "operation not allowed."i debug the code 

IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactory();

when program reached the above line.

It throws exception "Operation not allowed." i am stuck this line from last three days.I googled it.but could not find any answer.please help me.i will be very thanks full to all.pls pls pls help.