"Invalid license provided" exception when deploying generated test license

1822
5
Jump to solution
08-23-2012 05:14 AM
Labels (1)
Maartenvan_Dillen
New Contributor
Hi.

I am developing a WPF application using the ArcGIS Runtime SDK for WPF. I am using a developer license from the EDN.

I have followed your online instructions for deploying to a test environment. I generated the ArcGISRuntime1.0 folder (including the Local service option) and generated a test license using the License Viewer. I have put the generated line of C# code in the constructor of my module.

When running the application on a test system (or even on my development system), I get the following exception when opening a local mpk feature layer:

ESRI.ArcGIS.Client.Local.LocalServerException: Invalid license provided
at ESRI.ArcGIS.Client.Local.LocalService.FailStart(Exception error)
at ESRI.ArcGIS.Client.Local.LocalService.ContinueStartService(QueryParameters serviceSpecificParams)
at ESRI.ArcGIS.Client.Local.LocalService.StartServiceInternal(QueryParameters serviceSpecificParams)
at ESRI.ArcGIS.Client.Local.LocalMapService.StartMapServiceInternal(Boolean editable)
at ESRI.ArcGIS.Client.Local.LocalFeatureService.Start()
at ESRI.ArcGIS.Client.Local.LocalFeatureService.GetServiceInternal(String path, Nullable`1 maxRecords)
at ESRI.ArcGIS.Client.Local.LocalFeatureService.GetService(String path)

Opening online layers works fine.

Please advise how to fix this.

Thanks.
0 Kudos
1 Solution

Accepted Solutions
MiriRevivo
Occasional Contributor
Hi,

Make sure that you're initializing the Standard license (the one that allows you to work with the LocalServer) and not the Basic license (which only allows you to work either with tpks or with online data/services).
In the License Viewer you should check the Standard option in order to get the license string for Standard.

View solution in original post

0 Kudos
5 Replies
MichaelBranscomb
Esri Frequent Contributor
Hi,

Are you making the SetLicense call before InitializeComponent?

Cheers

Mike
0 Kudos
Maartenvan_Dillen
New Contributor
Yes. As a matter of fact, I have received a sample WPF application from Esri Netherlands which produces the same exception when opening a local mpk layer. It is available for anonymous download at ftp://support@ftp1.esrinl.com/download/1042201.zip

They have redirected me to this forum for further assistance.

Enabling the local USCitiesStates mpk in MainWindow.xaml line 28 makes the application crash with the license error.
0 Kudos
MiriRevivo
Occasional Contributor
Hi,

Make sure that you're initializing the Standard license (the one that allows you to work with the LocalServer) and not the Basic license (which only allows you to work either with tpks or with online data/services).
In the License Viewer you should check the Standard option in order to get the license string for Standard.
0 Kudos
Maartenvan_Dillen
New Contributor
Hi Miri,

Thanks a lot for your answer. This solved my problem!

From the user interface of the License Viewer tool I assumed that the Standard license was only needed for one or more Extensions that become enabled when you select it. It wasn't clear to me that it also allows for local map packages which aren't supported by the Basic license.

Thanks again.
Maarten
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
0 Kudos