locked
Insert application.xap into div aspx RRS feed

  • Question

  • Hello,

    I've built aspx page with few divs with xap(Silverlight) applications inside and it works. I opened a new aspx page and putted there in it's div another xap application - but this one's doesn't work. I get a message:

    Microsoft JScript runtime error: Unhandled Error in Silverlight Application
    Code: 2104   
    Category: InitializeError      
    Message: Could not download the Silverlight application. Check web server settings

    On the first aspx page this application works.

    What's my problem?

    Thanks.

    Saturday, June 4, 2011 7:03 AM

Answers

  • I don't think you did wrong. That seems incrrect path.

    Saturday, June 4, 2011 12:21 PM

All replies

  • Hi,

    Could you show us how did you do that somehow?

    <form id="form1" runat="server" style="height:100%">
        <div id="silverlightControlHost">
            <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
        <param name="source" value="ClientBin/BusinessApplication1.xap"/>
        <param name="onError" value="onSilverlightError" />
        <param name="background" value="white" />
        <param name="minRuntimeVersion" value="4.0.50401.0" />
        <param name="uiculture" value="<%= System.Threading.Thread.CurrentThread.CurrentUICulture %>" />
              <param name="culture" value="<%= System.Threading.Thread.CurrentThread.CurrentCulture %>" />
        <param name="autoUpgrade" value="true" />
        <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration:none">
          <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
        </a>
         </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
        </form>

    Saturday, June 4, 2011 7:10 AM
  • Sorry' it was my fault.

    The problem is that my Silverlight application is based on WCF Service. It sends a SMTP message. So, the SMTP part is in the Service1.svc. Then I take this SMTP.xap and add it to the ClientBint of the main application as an existing item. When I run the main application, I enter the form of SMTP.xap, write and submit my message and here I get a message (from my code) that the SMTP message was not send. It looks like the problem is in the Service.svc. I've organized the new ones for my main application with the same host port address, but still it doesn't work. What this might be?

    Thanks.

    Saturday, June 4, 2011 9:32 AM
  • Hi,

    Take a look with Fiddler http://www.fiddler2.com/fiddler2/version.asp.

    Saturday, June 4, 2011 9:39 AM
  • Hello,

    I've got an exception - it's a system exception: System.ServiceModel.CommunicationException: an error occurred while trying to make a request to URI'http://localhost:49502/Service1.svc'/ THis Could be due to attempting to access a service in a cross-reference way without aproper cross-domain policy in place...

    I don't know, I check this ServiceReference, there is no problem, the Reference Update is working. I think, I make some general mistake in adding a Silverlight application with a WCF Service to the aspx page. There is something else that I am misiing. What is it?

    Saturday, June 4, 2011 11:13 AM
  • Hello,

    I found the solution: I add my aspx page to the Silverlight application and it works. But what am I missing in adding Silverlight application to the aspx page?

    Saturday, June 4, 2011 11:55 AM
  • I don't think you did wrong. That seems incrrect path.

    Saturday, June 4, 2011 12:21 PM
  • Might be, I'll check it somehow.

    Thankyou for your cooperation.

     

    Saturday, June 4, 2011 12:34 PM
  • I thought, because of div object hierarchies

    Saturday, June 4, 2011 12:42 PM