0 votes

I have purchased Barcode License i integrate this xml file in our MVC Application and i have got a document after purchase but this is not for visual studio 2012. Documents steps and my steps doesn't match. Please suggest me, how i integrate this service.

thank you

by
retagged by

1 Answer

0 votes

"BarcodeLicense.xml" file is loaded from the run folder of your application (AppDomain.CurrentDomain.BaseDirectory). Remember also that your application needs to have read access to this file.

In case of ASP.NET applications "BarcodeLicense.xml" should be in the root folder of your web application (the folder with the "web.config" file).

You can use following code to get the license path ad status programmatically

string fileName = Limilabs.Licensing.LicenseHelper.GetLicensePath();
LicenseStatus status = Limilabs.Licensing.LicenseHelper.GetLicenseStatus();

The good solution (I use it myself) is to use the following code on application startup (e.g. in Global.asax):

LicenseStatus status = Limilabs.Mail.Licensing.LicenseHelper.GetLicenseStatus();
if (status != Limilabs.Licensing.LicenseStatus.Valid)
{
   throw new Exception(string.Format("License is not valid: {0}.", status));
}

This way you know about the problem as soon as possible.

by (300k points)
...