[2104 错误现在“神奇地”消失了,我还不知道发生了什么变化 - 所以请不要花时间在这上面。如果/当我找出导致原始问题的原因时,我会回复。]
运行 SL4、Win7、VS2010 SP1,并且在调试应用程序时出现此问题。我有两个不同的 SL 应用程序(项目),它们位于不同的 VS2010 解决方案中。我正在使用默认的调试网络服务器(卡西尼?)。应用程序 #1 包含指向应用程序 #2 的超链接,但是当我单击该超链接时,我收到主题错误消息。
应用程序 #1 也是一个 SL4 应用程序,链接是通过处理程序中的代码完成的:
System.Windows.Browser.HtmlPage.Window.Navigate(uri, "_blank");
我已经检查了调试器中的 uri,它看起来是正确的。另一个处理程序中的相同代码可以正常工作(链接到不同的目标)。
应用程序 #1 托管在 localhost:45621 上,而应用程序 #2 托管在 localhost:55562 上。当我单击应用程序 #1 中的超链接时,应用程序 #2 Web 服务器已经在运行。另外,如果我获取与所单击的超链接关联的 URL,并将其粘贴到新的浏览器地址栏中,则应用程序 #2 的 SL 页面将毫无问题地打开。
我有两个应用程序的 clientaccesspolicy.xml 文件:
<access-policy>
<cross-domain-access>
<policy>
<allow-from>
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
此时我不知道如何解决此问题,并且希望了解任何有关原因可能是什么或如何进一步隔离问题的建议。
提前致谢,
账单
[The 2104 error has now "magically" disappeared and I don't know (yet) what changed - so please don't spend time on this. I will post back if/when I figure out what caused the original problem.]
Running SL4, Win7, VS2010 SP1 and this problem occurs while debugging the app(s). I have two distinct SL apps (projects) and they are in different VS2010 Solutions. I'm using the default debug web server (Cassini?). App #1 contains a hyperlink to App #2, but when I click that hyperlink I get the subject error message.
App #1 is also a SL4 app and the linking is done with code in a handler:
System.Windows.Browser.HtmlPage.Window.Navigate(uri, "_blank");
I've checked the uri in the debugger and it looks right. Identical code in another handler works OK (linking to a different target.)
App #1 is hosted on localhost:45621 while App #2 is hosted on localhost:55562. App #2 web server is already running at the time I click the hyperlink in App #1. Also, If I take the URL associated with the hyperlink that is clicked and simply paste it into a fresh browser address bar then App #2's SL page opens without problems.
I have clientaccesspolicy.xml files for both Apps:
<access-policy>
<cross-domain-access>
<policy>
<allow-from>
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
I'm at a loss as to how to troubleshoot this at this point and would appreciate any suggestions as to what the cause might be -- or how to further isolate the problem.
Thanks in advance,
Bill
发布评论
评论(2)
请确认我所理解的是否是您的设置:
Web 项目 #1
Html 页面
Web 项目 #2
Html 或 Aspx 页面
您的 silverlight 应用程序就在这里
please confirm if what I understand is your setup:
Web project #1
Html Page
<a href="page in other project"...
Web project #2
Html or Aspx page
Your silverlight application is here
好吧..用两种解决方案进行了测试,即使没有 clientaccesspolicy 文件(因为我认为 Silverlight 是受限制的,但 HTML 页面不是,我打开了第二个 Silverlight 项目两次,没有问题。
尝试从头开始,然后看看是否仍然遇到这个问题。
Well.. did the testing with two solutions and, even with no clientaccesspolicy file (because I think Silverlight is the one restricted but the HTML page is not, I got the second Silverlight project opened twice no problem.
Try to do it from scratch and see if still get that problem.