Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have written an ArcEngine application using vb.net and Visual Studio 2010. When I initially started the code, I indicated an ArcInfo license was available during the project setup. This worked fine for a while, and then one day for no apparent reason it stopped...but at the time I didn't need ArcInfo, I just needed ArcView, so I changed the LicenseInitializer to use ArcView and it kept on working, so I didn't give it any thought. (How I wish I'd written down what might have changed!)

Now I do need ArcInfo for what I'm trying to do, and I've tried changing the requested license back using the Project->Add ArcGIS License Checking tool just in case I accidentally messed something up, but it won't work.

What is particularly confusing is that the error message I'm getting says ArcInfo isn't initialized, but then if you scroll down, it says it is (see image). Note that I'm not trying to use any of the extensions, just ArcInfo itself.

License Failure

I've stepped through the code, and the InitializeApplication function on the Startup handler (code below) returns true. The error occurs when my form with an embedded AxMapControl actually attempts to use the license (BeginInit method on AxMapControl).

Private Sub MyApplication_Startup(sender As Object, e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
    'ESRI License Initializer generated code.
    m_AOLicenseInitializer.InitializeApplication(New esriLicenseProductCode() {esriLicenseProductCode.esriLicenseProductCodeArcInfo}, _
    New esriLicenseExtensionCode() {})
End Sub

I know that I have an ArcInfo license on this computer, and now that I've regenerated the license for my code with the License Checking Tool I'm confident I haven't messed with any normally hidden files I shouldn't be touching. Any ideas as to what might be causing this error??

share|improve this question
    
have you contacted ESRI customer support? –  Craig Oct 8 '12 at 14:24
    
I've just sent a support request. I'll let people know how it goes... –  BeckyZ Oct 9 '12 at 13:22
    
Through some more careful stepping-through I've realized the error is actually on the EndInit method. So far ESRI has been unable to help, any ideas out there? –  BeckyZ Oct 10 '12 at 15:29
add comment

1 Answer 1

After several emails back and forth with ESRI customer support, I was unable to track down the source of this error.

However, I decided to remove the LicenseInitializer that was put in place by Visual Studio when I created the project (this used the AoInitialize class to attempt to initialize the license). Instead, I placed an AxLicenseControl on the startup form, inserted the RuntimeManager.Bind text in the startup form's Public Sub New, and voila! everything works.

So, I still don't know what CAUSED the error (all the checks ESRI had me perform indicated it should have been working), but I have found a workaround.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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