Hello,
We’ve come up with the following scenario during the investigations regarding a problem on of our customers had encountered. They have the following setup: two web applications under the same web site are using Aspose. The two applications use the SetLicense method in two different ways.
One of them has the license file loaded as an embedded resources while the other one has the license file at explicit path.
The problem they’ve encountered is that the application that has the license file embedded uses the explicit license file set by the second application instead of the embedded resource one.
I’ve read the remarks of the SetLicense method and I understood that this is expected:
Tries to find the license in the following locations:
1. Explicit path.
2. The folder that contains the Aspose component assembly.
3. The folder that contains the client’s calling assembly.
4. The folder that contains the entry (startup) assembly.
5. An embedded resource in the client’s calling assembly.
Note:On the .NET Compact Framework, tries to find the license only in these locations:
1. Explicit path.
2. An embedded resource in the client’s calling assembly.
Is there any way we can change our SetLicense call to make it prioritize the embedded resource instead of the explicit file?
If not, is this something on the roadmap ?
@kaushlendu.choudhary
Your query is more related to .NET APIs instead of Aspose SetLicense method. There is no APIs to call SetLicense and prioritize the embedded resource. You can use the same license in your both applications and call the SetLicense method according to your requirement.
I think you misunderstood the problem here, Tahir. We have 2 web apps, developed by 2 software vendors, both using Aspose.Cells. Obviously the licenses are different and they have different expiration times.
For whatever reasons our customer decided to deploy (host) both these web apps under the same IIS server.
In this scenario when we call SetLicense like below
_license.SetLicense(“Aspose.Total.lic”);
Our app gets the license that is in the folder of the other app on the same server. WE have the license embedded in the solution. This does not happen when there is only one app using Aspose libs on the IIS server.
Please advise.
@kaushlendu.choudhary
It is difficult to prioritize the default location as per your requirement. Please share the complete steps that you are following to reproduce the same issue at our end. Please also share the web applications along with license file here for testing.
Please post your license file via private message
. In order to send a private message with attachment, please click on my name and find “Message” button. Please check the attached image. send message.png (20.7 KB)
We will investigate the issue with your license file on our end and provide you more information.
P.S. Please do not share your license file publicly in forum threads.
@tahir.manzoor Thank you for your answer.
Unfortunately as I mentioned earlier only one of the applications (the one that uses the license as an embedded resource) is developed by our company. We don’t have access to the other application’s details or license outside of the information that our customer is willing to share with us.
That being said I would assume that the current behavior is intended.
Please consider this ticket as a suggestion for the roadmap if possible.
Please keep us posted if any implementation regarding of prioritization of the licensing method will be added to the roadmap.
@manikya.rao
Unfortunately, your shared information is not clear. Please share the complete detail of your use cases. We will then check the possibility of implementation of this feature. Thanks for your cooperation.