Showing results for 
Search instead for 
Did you mean: 

.net error 1172

Go to solution

I am trying to get access to the methods of a .net dll (assembly).  I am always getting error 1172, "error calling static method...access to the registry key is denied".    The static method is supposed to give me an instance of the object.  I'm working in LV2010.  I have tried:


- assembly is in the same directory as the calling vi.

- assembly is in the same directory as labview.exe

- tried both as a project and standalone vi

- I tried to add the assembly as a reference in tools>>import>>.net controls to palette.  When I browse to the dll, I get the message "This assembly contains no public control", so there is nothing to add to the destination folder.

- I added the dll path to the vi search path.

- used both a .net ref constant and a constructor from the net palette


My only remaining hope is to add the assembly to the GAC (global assembly cache), but this looks difficult.  Any suggestions greatly appreciated, as I am really stuck.

0 Kudos
Message 1 of 23

Where does the error occur exactly: Development or execution? If execution: Does the constructor run without errors? You state that the method creating the error should create the object. So this is the default constructor?


Is this error limited to your specific assembly? Please try System.Forms or similar Microsoft supplied assembly as reference.

If it is limited to your assembly: What registry key does the error refer to? Does the assembly read/write from/to the registry?


What version of .NET are you using?

Are there limited user rights?




CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 23

Hi Norbert,


I am using .NET 4.5.  Yes, the error is occurring in the constructor.  I have attached a screen shot to show the error.  I am starting to look into the MSDN exception handling.



0 Kudos
Message 3 of 23
Accepted by topic author psuedo

The problem has been solved.  Labview needs to be run as administrator.

Message 4 of 23

Error 1172 seems to be a general .NET error and does not relate to a spefic error type. Here is a good description of it : and here is an example of what may cause the 1172 error:


But, below is an example of the error 1172 that I cant solve. The attached vi produces the error 1172 no matter what I try to do. What I am trying to accomplish is to embed and work with maps in LabVIEW using .net and this llb. I am not trying to use an embedded browser or create a static http link to google maps, this has been done before and usefull VIs for this purpose already exist, however they have quite a few limitations when you really want to work with maps.


This free libarary (GMap.NET) has had over 153.197 downloads and despite its nam supports: Google Maps, Yahoo maps, BING maps, ARGGis maps, Open Street maps, OVi maps etc. The big question is if Gmaps will run in G, i.e.will it run in LabVIEW ?. I have tested the attached code in LV2011 on my trusted old XP machine and also on LV2013 running in Win7. More details are described in the diagram of the attached VI.


If you can guide me in a direction of solving this problem I will forever be thankfull. 





ERROR 1172

Error creating instance of BingMapProviderBase in assembly GMap.NET.MapProviders.BingMapProviderBase, GMap.NET.Core, Version=, Culture=neutral, PublicKeyToken=b85b9027b614afef, (System.MissingMethodException: Cannot create an abstract class.) <append><b>System.MissingMethodException</b> in Helper

0 Kudos
Message 5 of 23

I was able to repeat your error. But, when I selected the AccessMode Object under GMap.NET, error 1172 no longer occurs.

It appears that there may be some type of initialization routine that you need to call to run the map provider base.

I recommend looking at examples that call this DLL in other languages or contact the creators to get an idea of how it may need to be called properly



0 Kudos
Message 6 of 23

søren_hallberg_jensen, were you able to solve this problem?  I have the same issue you explained with the latest "GMap.NET" library (V1.7.0)

0 Kudos
Message 7 of 23

. . . Some object references need to be called as static ones using a PROPERTY NODE. This means that error 1172 will be thrown if you otherwise try to use the 'Constructor' .net initialization node.


See code below on how the GoogleMap provider was instanced (statically) and then the code was extended to give the Lat and Lng location for Calgary, Alberta, CANADA.


This is one way to make GMap return Lat and Lng coordinates from physical address info.


Anthony Lukindo

0 Kudos
Message 8 of 23

The GMap.NET component is in the public domain available from:




Atttached are project VIs that use much of the Methods and Properties that come with this excellent GPS control.


NOTE: I have carved-off sections of code that are specific to my project so the code will look empty in certain sections. Otherwise, the goal was to share how to get started programmimg with this control in LabVIEW.


The VIs are in LabVIEW 8.6


Anthony Lukindo

Message 9 of 23

Guys, Running LabVIEW 2014 SP1, I get a load error when trying to browse for any of the two DLLs * GMap.NET.Core.dll or * GMap.NET.WindowsForms.dll But return the not very helpful err message : "An error occurred trying to load the assembly", please see screenshot. Has anyone else been successfull running the GMAP with DLL ver. ? And if so, any tricks involved in getting it to run ? /søren Siriusly : sorry no, was not able to solve the problem.

0 Kudos
Message 10 of 23