Select to view content in your preferred language

Offline license authentication with signing in to Portal for ArcGIS account

150
2
Jump to solution
3 weeks ago
Labels (1)
hitsujir_dev
Emerging Contributor

I am a beginner of Maps SDK for .NET and try to understand license and authentication.

My end user is developing a .NET application (standalone Windows desktop) and the application will operate fulltime offline.

I have two questions of authentication and license.

===
He tries to authorize license by using Portal for ArcGIS signing in and considers steps below.

Steps
1. In the environment A which is connected to Portal network, he get LicenseInfo as JSON formatted text and save it.
https://developers.arcgis.com/net/license-and-deployment/use-a-license-in-your-app/#how-to-use-user-...

2. In the environment B which is fully standalone, he moves the LicenseInfo JSON from environment A.
Then, he gets the license JSON stored on the device. The application will start in environement B(?).

===


My questions:
Question A. In terms of functionality, is it possible to realize these two steps?
I think that the license JSON from environment A is not available in environment B if LicenseInfo(licenseInfo.ToJson() ) have an information of environment licenseInfo.ToJson().


Question B. In terms of master agreements, is it okay to follow these steps?
He will prepare two enterprise usertypes certainly, but environment B will not be connected to the Portal network.

Of course, if environment B is fully standalone, it is better to use license key than signing in to Portal, but he asked me these points.



Resources: 
https://developers.arcgis.com/net/license-and-deployment/use-a-license-in-your-app/#how-to-use-user-...

Your app is now licensed for production use.

If you saved the license information on local storage, your app can be started and licensed in an offline environment using the saved license information. Retrieve the license from storage and license your app.

// Get the LicenseInfo as JSON formatted text
string licenseJson = licenseInfo.ToJson();
// ... save text string locally ...

// (on startup) ... get the license JSON stored on the device ...
// Set the license info from the saved JSON string
LicenseInfo license = LicenseInfo.FromJson(licenseJson);

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

The license you get from the portal is only good for 30 days for that user, so that workflow is really only for occasionally connected scenarios, and it's recommended to renew it daily or at least weekly if you can (so you always have 30 days of full offline time before it expires).

For a fully offline workflow you'll need to purchase a license pack.

View solution in original post

0 Kudos
2 Replies
dotMorten_esri
Esri Notable Contributor

The license you get from the portal is only good for 30 days for that user, so that workflow is really only for occasionally connected scenarios, and it's recommended to renew it daily or at least weekly if you can (so you always have 30 days of full offline time before it expires).

For a fully offline workflow you'll need to purchase a license pack.

0 Kudos
hitsujir_dev
Emerging Contributor

Thanks!

Yes, like you said, portal license is only available for 30 days, so renewing license info daily/weekly model is not suitable for fulltime offline device.

I will recommend that he purchase a license pack.

0 Kudos