cfg.AddIn.SOType.Name = this.GetProperty(tt, obj2, "ServerObjectType"); if ((cfg.AddIn.SOType.Name != "MapServer") && (cfg.AddIn.SOType.Name != "ImageServer")) { throw new Exception(string.Format(Resources.InvalidAddInServerObject, cfg.AddIn.SOType.Name, "MapServer", "ImageServer")); }
Sebastian,
Yes, it is still possible to debug an SOE.
The error message you mention could be due to attaching to the wrong ArcSOC process. Be sure that the ArcSOC process "Type" is "Managed".
Also, if you are running several different SOEs on multiple services, you can pinpoint which ArcSOC belongs to which services by opening Windows Task Manager and enabling the "Command Line" column. The "Command Line" column values will include the name of the services associated with a given ArcSOC.
To add to Erin's fine suggestions: you can add the following line of code at the point where you want to debug:
System.Diagnostics.Debugger.Launch();
Once you are attached you can stop and start your services as desired and you will remain attached to the code.
Make sure you have the correct version of ArcObject SDK installed. I ran into the same issue and it turned out that i had ArcObject SDK version 12.2.2 and Server 10.2. Once I had the same version I didn't get any error when building.