I'm working on a webservice in ArcObjects 9.3. It works fine when deployed on IIS, but when I try to debug some unit tests I keep getting the same error:

The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

The error occurs when calling the CreateFeatureClass(..) method throught the IDataset interface.

public void CreateOutputFeatureClass(string featureClassName)
        var masterFeatureClass = Helpers.GetMaster(Session, ServerContext);
        IFeatureClassDescription fcDesc = new FeatureClassDescriptionClass();
        var ocDesc = (IObjectClassDescription)fcDesc;
        var featureDataset = featureWorkspace.OpenFeatureDataset(Session.Dataset);
        featureDataset.CreateFeatureClass(featureClassName, masterFeatureClass.Fields, ocDesc.InstanceCLSID,
            ocDesc.ClassExtensionCLSID, esriFeatureType.esriFTSimple, masterFeatureClass.ShapeFieldName, "");            

Based on other posts I have been reading about this error this has something to do with user permission, but I am not sure.


This issue was caused by this line of code:

IFeatureClassDescription fcDesc = new FeatureClassDescriptionClass();

I should have created that object within the ServerContext. In my code sample above I created the feature class description outside the serverContext and used it to create a feature class in a feature dataset that was created within the serverContext. This conflicted and was perceived as a remote procedure (cfr. Error message).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.