1

I create a WCF Service.

When I try to Initialize ArcGIS License with AOInitialize I get error:

The underlying connection was closed: The connection was closed unexpectedly.

public void initializeArcGISLicenses()
    {

            RuntimeManager.Bind(ProductCode.EngineOrDesktop);
            AoInitialize ao = new AoInitialize();
            if (ao.IsProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeAdvanced) == esriLicenseStatus.esriLicenseAvailable) //Error is here
                ao.Initialize(esriLicenseProductCode.esriLicenseProductCodeAdvanced);
           /* else if (ao.IsProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeBasic) == esriLicenseStatus.esriLicenseAvailable)
                ao.Initialize(esriLicenseProductCode.esriLicenseProductCodeBasic);
            else if (ao.IsProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeStandard) == esriLicenseStatus.esriLicenseAvailable)
                ao.Initialize(esriLicenseProductCode.esriLicenseProductCodeStandard);*/
    }

What's the problem? Sorry for my English.

Your Answer

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

Browse other questions tagged or ask your own question.