Hi,
We have an Aspose Total for .Net licence with a subscription expiry of 20240418. We are using Aspose.GIS 20.1.0 in a .Net Core web application. Upon uploading a shapefile to the application we’re getting an error that the 100-feature limit for an evaluation licence has been exceeded.
The licence is set in the Program.cs with no issues and I’ve tried both reading from a file and reading from a memorystream.
I then upgraded my version of Aspose.GIS from 20.1.0 to 23.12.0 using the Nuget Package Manager to see if the issue was related to a particular version of the library. Having done that, I can now import shapefiles with over 100 features in with no problems at all.
The issue has been resolved but I’m keen to know what the reason was for the 20.1.0 not working, when my understanding of your licencing setup is that it should have been fine.
Regards
Pete
@PeteAspose
Overview
Aspose.Total .NET licenses cover all Aspose .NET components, including Aspose.GIS.
The license you received (expiry 2024‑04‑18) is fully valid for any GIS version that is still under support.
The behavior you observed with Aspose.GIS 20.1.0 (evaluation‑mode 100‑feature limit) is caused by one of the following:
Reason |
Explanation |
How it was resolved |
License format change – older GIS versions (≤ 20.1.x) expected the license XML to contain a <Products> node with the exact product name Aspose.GIS. The Total license generated after 2020‑12 does not include the entry for this legacy component, so the component could not find a matching entry and fell back to evaluation mode. |
The newer GIS releases (22.x +), including 23.12.0, have been updated to read the new “AllProducts” section that the Total license uses, so they can locate the license automatically. |
Upgrading to 23.12.0 let the component read the newer license format, therefore the restriction disappeared. |
Bug in license loading for .NET Core – in the 20.1.0 build the static License class did not correctly handle assembly loading when the application was a .NET Core web app. The license was silently ignored. |
This bug was fixed in the 21.x release line. |
Moving to a later version (23.12.0) eliminated the bug. |
License generated for a later product version – if the license was re‑issued after the 20.1.0 release, the Version attribute inside the <Product> node may be higher than the library can parse, causing it to reject the file. |
Newer libraries ignore the version check; older ones treat the mismatch as “license not applicable”. |
Using a newer library made the version check pass. |
Bottom line
- Aspose.GIS 20.1.0 can work with a Total license, but it requires a license file that explicitly lists Aspose.GIS in the
<Products>
section and is compatible with the older XML schema.
- The simpler and recommended approach is to use a more recent GIS version (22.x +) where the licensing code has been unified and the older XML quirks are no longer an issue.
What you can do if you need to stay on 20.1.0
-
Request a legacy‑compatible license
Open a ticket and ask us to generate a Total license that contains an explicit <Product>
entry for Aspose.GIS with version 20.1.0.
-
Edit the license XML manually (quick test only)
<?xml version="1.0" encoding="utf-8"?>
<License>
<Products>
<Product>
<Name>Aspose.GIS</Name>
<Version>20.1.0</Version>
</Product>
<!-- other products from your Total licence -->
</Products>
<Data>…base64‑encoded licence data…</Data>
</License>
Do not modify the <Data>
node.
Place this file in your project and load it once before any GIS API call.
-
Ensure the license is set before the first GIS call
using Aspose.Gis;
public class Startup
{
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
// Load the license as early as possible
var license = new License();
license.SetLicense("Aspose.Total.NET.lic");
// …rest of the pipeline configuration
}
}
The call to SetLicense
must be executed before any FeatureCollection
, VectorLayer
, etc. are instantiated.
Recommended next steps
-
Upgrade to the latest Aspose.GIS version (currently 23.12.0).
- You get the bug fixes, performance improvements, and a unified licensing model.
- No extra work is required – just update the NuGet package and keep using the same Total license file.
-
If you must remain on 20.1.0, open a support ticket (or reply here) asking for a legacy‑compatible Total license. Provide:
- Your current license file (redacted of personal data).
- Confirmation that the project targets .NET Core (e.g., .NET 6 or .NET 7).
We will issue a license that works with the older schema.
Helpful Links
If you have any further questions or need a custom license file, feel free to reply to this post. We’re happy to help!
Thanks for the quick reply. I have made the following changes but the 100-feature limit is still in place:
image.png (36.2 KB)
Assuming the changes above are as expected, the fix doesn’t appear to have worked. Does this mean that requesting a licence in the legacy format would be unlikely to work too?
@PeteAspose Products go through a certain development cycle and their license too. Between 23.12 and 20.1, a very long period of time, there was an update of the licensing mechanisms, 20.1 does not support the updated version, you can try to request a license in the old format through the forum, but current versions of Aspose.GIS have more functionality.
Hi
See attached for an edited licence file. Let me know if you need any of the information that I have removed in order to generate a compatible licence. Moving to a newer version of the library is something we’d like to avoid doing if at all possible.
Aspose.Total_Edit.zip (793 Bytes)
Hi,
Just wondering if there was any update on this please?
@PeteAspose we can not add support of new license to the old version of Aspose.GIS. Do you have the old format license for Aspose.GIS for .NET 20.1? You can continue use the old license for the old version of Aspose.GIS.
We do have an old licence, but that’s not happy within the web application we have developed as the web application is .Net Core 6 and Aspose.GIS 20.1 won’t know about that version of .Net Core.
I think the only option left is updating the library to better match the newer licence and then redeploying the application.
@PeteAspose Sure, it’s the best decision. Newer versions are better.