DocumentUri returns file path
In a Silverlight application, the System.Windows.Browser.HtmlPage.Document.DocumentUri object returns a physical file path rather than an HTTP: address. W开发者_开发百科hat would cause this?
You've navigated to the host web page via the file system not via http.
This question is old, but maybe I will save someone a couple of minutes.
I experienced this issue running the web application out of visual studio, after I had inadvertently set my Silverlight project to the StartUp Project.
Setting the website project you use to host the Silverlight application to be the StartUp project should fix the issue.
精彩评论