0 votes

I've just purchased my license and obtained a License.xml file.
Now how can I put this file inside a SQL Assembly to use Mail.dll from my .Net CLR StoredProcedure?

I've tried using CREATE ASSEMBLY Mail FROM 'C:\Mail.dll'
but seems no license has been found!
As you know an assembly is stored in binary form inside SQL...

Help me!


closed with the note: Best answer provided. Thanks

1 Answer

0 votes

License file ("MailLicense.xml" you received after purchase via email or download link) is loaded from the run folder of your application (AppDomain.CurrentDomain.BaseDirectory).

In case of MSSQL it's install path of the server e.g.:
C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\Binn\

You can use LicenseHelper class to obtain the exact path, and the current status of the license:

string fileName = Limilabs.Mail.Licensing.LicenseHelper.GetLicensePath(); 
 LicenseStatus status = Limilabs.Mail.Licensing.LicenseHelper.GetLicenseStatus(); 
by (298k points)