开发者

Error 2104: Could not Load Sivlerlight Application

[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开发者_StackOverflow中文版> 
      <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


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜