<![endif]–>
Hi,
Aspose.Cells for
.NET does not look for license on specific path or in specific order. It
looks for a license on the path you mentioned.
Suppose you mention this path C:\myFolder\License.lic then Aspose.Cells for .NET will look for license in the C:\myFolder.
Suppose you don’t mention the path in the set license.
Then it will look for license in the current directory.
Please see the code below, in this code, I have not mentioned the complete path, now Aspose.Cells for .NET will look for it in the current directory. Please see its output
C#
//If you will not mention the path Aspose.Cells for .NET will look for it
//in current directory
License lic = new License();
lic.SetLicense("License.lic");
//Will print the path of current directory
System.Diagnostics.Debug.WriteLine("Aspose.Cells will look for \"License.lic\" on this path: " + Environment.CurrentDirectory);
Output:
Aspose.Cells will look for "License.lic" on this
path: F:\Shak-Data-RW\Projects\AsposeProject\AsposeProject\bin\Debug
An additional note for Asp.NET application, suppose, if you have placed a license file in your virtual directory and your virtual directory is at this path F:\Shak-Data-RW\Projects\AsposeProject\AsposeWebSite\ and you have placed a license at this path F:\Shak-Data-RW\Projects\AsposeProject\AsposeWebSite\License.lic, then you will use the following code to access it.
C#
string pathLicense = Server.MapPath("~") + "\\License.lic";
License lic = new License();
lic.SetLicense(pathLicense);