Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Silverlight DocumentUri返回文件路径_Silverlight - Fatal编程技术网

Silverlight DocumentUri返回文件路径

Silverlight DocumentUri返回文件路径,silverlight,Silverlight,在Silverlight应用程序中,System.Windows.Browser.HtmlPage.Document.DocumentUri对象返回一个物理文件路径,而不是HTTP:address。什么会导致这种情况?您已经通过文件系统而不是http导航到主机网页。这个问题很老了,但也许我可以为您节省几分钟时间 在我无意中将Silverlight项目设置为StartUp项目后,在visual studio外运行web应用程序时遇到了这个问题 将用于承载Silverlight应用程序的网站项目设置

在Silverlight应用程序中,System.Windows.Browser.HtmlPage.Document.DocumentUri对象返回一个物理文件路径,而不是HTTP:address。什么会导致这种情况?

您已经通过文件系统而不是http导航到主机网页。

这个问题很老了,但也许我可以为您节省几分钟时间

在我无意中将Silverlight项目设置为StartUp项目后,在visual studio外运行web应用程序时遇到了这个问题

将用于承载Silverlight应用程序的网站项目设置为启动项目应该可以解决此问题