Despite following guidance about how to first bind, then initialize a licence for a standalone WinForm uses some arcobjects, I still get the "80040111 ClassFactory cannot supply requested class" error once I call GxDialogClass(). When debugging, the status object beneath comes back as licence checked out - so it successfully binds AND gains a licence. Yet the 80040111 indicates that I haven't.

We are running ArcGIS 10.2.1.

IAoInitialize aoInitialize = new AoInitializeClass();
var status = aoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeAdvanced);
IGxObjectFilterCollection dialog = new GxDialogClass();

Any ideas?


  • I think you are conflating two different methods of initialization, just use the newer RuntimeManager.Bind method and not the older IAoInitialize method. – blah238 Apr 7 '14 at 20:40
  • What is the result of the IAoInitialize.Initialize call? Also, when on Desktop, make sure your program runs as 32-bit (set the Platform target to x86). – Petr Krebs Apr 7 '14 at 20:45
  • @blah: I thought runtime binding and licence checkout are two separate things aren't they? I believe you need to do both as indicated here – Petr Krebs Apr 7 '14 at 20:47
  • I don't think so; unless you need to check out specific extensions, runtime binding is all you need. – blah238 Apr 7 '14 at 20:57
  • Binding isn't enough unfortunately - it tells me that I don't have the necessary licence installed - you are merely telling the licence initializer which ArcGIS install version to use (AFAIK). Although there is a BindLicence call. This has the same behaviour as calling the AOInitialize. – Matt B Apr 7 '14 at 21:01

This is all I need to get things going in a standalone .NET app. We have a floating license server rather than individual licenses though, I'm not sure if that matters:

if (ESRI.ArcGIS.RuntimeManager.ActiveRuntime == null)
| improve this answer | |
  • Tried this approach, no luck. It is embedded deep into an extensively modularised admin app. Have a hunch there may is threading nastiness introduced by Infragistics GridView controls being using. If BindLicense method is called in the program Main method, then errors occur in GridViews when trying to render bitmap icons into the grid (image.get_width() - invalid parameter etc.). Discussions on forums for get_width errors points towards other threads disposing of images before the GridView gets to the image. Why should initialising a licence before rendering the grid affect it? – Matt B Apr 7 '14 at 22:07
  • 1
    ESRI objects are not thread safe. If you initialize a license on the main thread and try to use it in a worker thread there's no guarantee it will work. Any meaningful functions in ESRI must have an initialized license to work, if they don't they will return an error. That's the way that they do it and you can work with it or go open source - your choice. – Michael Stimson Apr 7 '14 at 23:22

Your Answer

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

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