Profile Picture

MethodAccessException on initializing a desktop license with NLicenseManger.SetLicense()

Posted By Michael Krüllmann 6 Years Ago

MethodAccessException on initializing a desktop license with...

Author
Message
Michael Krüllmann
Posted 6 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 6, Visits: 82
Hello support,

on initializing the desktop license using the NLicenseManager.SetLicense() method we encounter following exceptions:
"Nevron.Licensing" loaded
"System.MethodAccessException" in Nevron.Licensing
"System.MethodAccessException" in Nevron.Licensing
"System.ArgumentNullException" in mscorlib.dll
"System.MethodAccessException" in Nevron.Licensing
"System.MethodAccessException" in Nevron.Licensing
"System.MethodAccessException" in Nevron.Licensing

The classes using the chart library hold a reference to a static instance of the class "License" as shown below:
"private License license = License.Instance;"
So, on creating the first chart the single instance of "License" is created.

public sealed class License
{
   private static readonly License instance = new License();
   private License()
   {
    NLicense license = new NLicense("<guid_string>");
    NLicenseManager.Instance.SetLicense(license);
    NLicenseManager.Instance.LockLicense = true;
   }
   public static NVLicense Instance { get { return instance; } }
  }

Thank you in advance for any help,
Michael Krüllmann


Nevron Support
Posted 6 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 4 hours ago
Posts: 3,054, Visits: 4,009
Hi Michael,
The licensing may throw System.UnauthorizedAccessException, when it tries to read the registry but does not have permissions to do so. However those exceptions are handled internally and should not interfere with the normal flow of the program. We tested with the code you send us and could not locate a MethodAccessException exception - can you send us a small project replicating that or perhaps we can have a short web meeting to check this on your end.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic