开发者

Silverlight flow when running in browser -(silverlightControlHost source tag)

I am a beginner in silverlight and want to know about the silverlight flow when running in a browser:

I've download an application from web that combine with silverlight + wcf, and want this wcf to run in my silverlight application. I've copied the wcf project called fileupanddownlod.web into my silverlight solution. so now I have these projects: silverlightapplication1 (silverlight, contains the service reference fileupanddownload) fileupanddownload.web (WCF)

I've tried to run the silverlight as startpproject - so it runs a path of

...\Bin\Release\SilverlightApplication1TestPage.html 

but when I called the wcf in cause communication exception. so I saw in the project I've download that they run the wcf - fileupanddownload.web as startupproject so then it runs the path:

this seems more correct....

BUT... when I run the silverlight as strtup project I can see in the browser the xaml I want to run, and when setting the fileupanddownload.web as startup project I can only see the xaml that was in the project I've download, but I don't know from where it takes it...

can someone let me know: where can I see the code of the connection that silverlight does in order to run a xaml from the aspx file? I can see only that th开发者_运维百科e source is :

 <param name="source" value="ClientBin/FileUpAndDownload.xap"/>

is it here I have to change? and if yes - how can I generate a xap (and what is it xap)

thanks a lot!


Xap is the extension for Silverlight applications, i.e. the last thing the Silverlight build rules produce.

When hosting silverlight applications in web projects, you need to configure the web project to properly reference them:

  • right-click on the web project and click Properties
  • go to the Silverlight Applications tab

    Silverlight flow when running in browser -(silverlightControlHost source tag)

  • click Add...
  • select the existing silverlight project from the combo box

    Silverlight flow when running in browser -(silverlightControlHost source tag)

  • click Add

You'll now be able to run the your latest silverlight build from the web project.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜