I have downloaded and installed the 2.0 SDK. When I run the application in VS2010 I get an error in the App.xaml.cs file when trying to read the xml key:
private void Application_Startup(object sender, StartupEventArgs e)
{
string xmlConfig = e.InitParams["xml"];
//this.RootVisual = new Page(xmlConfig);
this.RootVisual = new LightPage(xmlConfig);
System.Windows.Browser.HtmlPage.RegisterScriptableObject("mySLapp", this.RootVisual);
}
The error occurs when trying to read xml key at "e.InitParams["xml"];"
The key is defined with the Default.htm as follows:
div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2"
width="100%" height="99%">
<param name="source" value="ArcGISSilverlightSDK.xap" />
<param name="onerror" value="onSilverlightError" />
<param name="background" value="white" />
<param name="initParams" value="xml=Assets/SDKConfig.xml" />
<param name="onLoad" value="pluginLoaded" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true" />...
I have not changed anything within the code.
When I publish the website as is the code works.
Any thoughts???