AE development encounters
This application has not been initialized with an ESRI license and will not function correctly
There are two solutions:
(1) The arcgis service is not enabled. This problem occurs.
Solution: Enable the arcgis service;
(2) This problem occurs when the arcgis service is enabled.
The method is as follows:
Using ESRI. ArcGIS. esriSystem;
Namespace WindowsApplication1
{
Public partial class Form1: Form
{
Public Form1 ()
{
InitializeComponent ();
}
Private void Form1_Load (object sender, EventArgs e)
{
IAoInitialize m_aoinitialize = new AoInitializeClass ();
M_aoinitialize.Initialize (esriLicenseProductCode. esriLicenseProductCodeArcInfo );
}
}
}
After I add This, the prompt "Warning: This application has not been initialized with an ESRI license and will not function correctly." is not displayed.
PS: the key is to add red code to the From_Load event of the form that calls ArcGIS Engine. You can copy and paste the Code directly.
In addition, some people say that when you set the liscence attribute in ArcGIS Engien programming, You need to select the Enterprise Edition or Arcinfo edition. Although multiple options are selected, you 'd better select one. Otherwise, the execution will be performed at the lowest level.
Using the IAoInitialize interface for initialization, the Initialize method can only be called once, redundant calls do not take effect, the truth is like the above LicenseControl selected multiple licenses (http://tieba.baidu.com/f? Kz = 420172163 ).
If an extension is used, check the functions in the extension.