This project is read-only.

token is null within Application_Startup

Nov 21, 2008 at 5:12 PM
Hi. DeepEarth is great !

Maybe someone could help me with this problem.
I always get a token value of null in this method :

 private void Application_Startup(object sender, StartupEventArgs e)
            string token = e.InitParams["clientToken"];
            RootVisual = new Page(token);

although the credentials (password & username) are set in the web.config files (for all Virtual Earth projects).

I would appreciate any help.

Nov 21, 2008 at 5:25 PM
Hey Chris.  So if your sure you've set the Web.config, I'd recommend one other area to check.  Browsers by default cache the .XAP file so you could be running the prior version regardless of your changes.  There is a little dance (Silverlight Shuffle) you have to do to make sure the debug symbols to load:
  1. Clear the Browser cache.
  2. Stop all Development Server instances.
  3. Clean the solution.
I've gotten so used to this, it is now almost automatic when I see the my breakpoints aren't solid red.  Has anyone written script that will do this automatically? 
Nov 24, 2008 at 10:48 AM
Thanks alot RoadWarrior !

Unfortunately this did not solve my problem.
I am still getting a KeyNotFoundException saying that the key "clientToken" could not be found.
This sucks....
Nov 24, 2008 at 11:08 AM
I am wondering why GetToken() in class _Default in file Default.aspx.cs is never called.
Should'nt this be called before e.InitParams["clientToken"]; ?
I am new to the C# world (coming from C++/Java) so maybe I am getting this wrong.
Advice would be appreciated

Nov 24, 2008 at 11:20 AM
Edited Nov 24, 2008 at 11:23 AM
Nov 24, 2008 at 11:38 AM
have you tried to load up the "OSM" website, this does not use any "InitParams" so maybe you can see if that project/website loads and if it does then you know it is Silverlight issue maybe...?
also have you tried the virtual earth site in the examples folder, not the prototype project...?

2008/11/24 neocortex <>

From: neocortex

Well, it seems now that none of the param keys for the silverlight object in default.aspx
can be found by e.InitParams["background"];

Read the full discussion online.

To add a post to this discussion, reply to this email (

To start a new discussion for this project, email

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at

David Thiessen
Nov 24, 2008 at 11:54 AM

I just had the wrong project marked as current project. Unbelievable.....
It is working now :) Can't wait to hack my way through the code.

Thanks for your responses.
Good to know that this place is alive.

Much regards,