AnsweredAssumed Answered

Windows Store App - Subsequent Initialization when Client ID is Incorrect?

Question asked by TylerESRI on Dec 5, 2014

Hello,

I am developing a Windows Store App using the ArcGIS Runtime SDK for .Net.  To initialize the environment, I am using the sample code provided:

 

Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.ClientId = "mYcLieNTid";

 

 

try

{

    Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize();

}

catch (Exception ex{ }

 

If an incorrect client ID is used, I will hit the catch clause with an "invalid client ID" message as expected.  The problem is that when I set the client ID again, it causes an exception with the message "you can't set the client ID after initializing" or a win32 runtime error on the Initialize() method.  I have tried setting the client ID to null before setting again, but that gave me the same results.  Any ideas?  The only way I seem to be able to try to initialize the environment again is by shutting the app down completely.

 

Thanks

Outcomes