2

I am at a complete loss... I have a Server 10.0 license on my machine but the following code fails:

if (ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server) == false)
    throw new Exception("License Failed");

MapServerClass mapServer = new MapServerClass();
mapServer.Connect(pathToMap); // Fails! 

ComException was unhandled

MapServer is not supported with the current license.

1 Answer 1

1

Figured it out immediately after asking this... funny how that works.

Solution:

IAoInitialize aoInit = new AoInitializeClass();
aoInit.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer);
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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