ArcEngine发布WebService服务
最近用ArcEngine10.1和vs2010写了个空间分析的webservice,在本地vs运行正常部署到IIS返回错误。
个人认为错误出在注册license部分(红色部分)代码如下:
ESRI.ArcGIS.esriSystem.esriLicenseProductCode licenseProductCode = esriLicenseProductCode.esriLicenseProductCodeEngine;
ESRI.ArcGIS.esriSystem.esriLicenseExtensionCode licenseExtensionCode = esriLicenseExtensionCode.esriLicenseExtensionCodeSpatialAnalyst;
ESRI.ArcGIS.esriSystem.IAoInitialize aoInitialize = new ESRI.ArcGIS.esriSystem.AoInitializeClass();
ESRI.ArcGIS.esriSystem.esriLicenseStatus
licenseStatus = aoInitialize.IsExtensionCodeAvailable(licenseProductCode, licenseExtensionCode);
if (licenseStatus == ESRI.ArcGIS.esriSystem.esriLicenseStatus.esriLicenseAvailable)
{
licenseStatus = aoInitialize.Initialize(licenseProductCode);
}
aoInitialize.CheckOutExtension(esriLicenseExtensionCode.esriLicenseExtensionCodeRuntimeStandard);
aoInitialize.CheckOutExtension(esriLicenseExtensionCode.esriLicenseExtensionCodeSpatialAnalyst);
求大神帮忙啊!!!
转载自:https://blog.csdn.net/nothing_is_imposible/article/details/17276849