我仍然可以从网站上附加并运行Silverlight 5 OOB应用程序吗? [英] Can I still attach and run a Silverlight 5 OOB app from a Website?

查看:59
本文介绍了我仍然可以从网站上附加并运行Silverlight 5 OOB应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我在Code Project中创建了一个小应用程序,该应用程序是用Silverlight 5(vb)设计和编写的.我选择对应用程序使用浏览器外设置(OOB),因为我不想仅将整个页面用于小型计算器应用程序.我的问题是,我是否仍可以从用户在线附加并运行OOB应用程序,而用户却无法下载它?部署到服务器的过程是什么?我假设一旦将其部署到服务器后,网页上的链接就会启用该应用程序的运行?我是该领域的新手,因此非常感谢您提供任何建议.
此致
Will.

Hi everybody at Code Project., I''ve created a small application which is designed and written in Silverlight 5 (vb). I chose to use the out of browser settings (OOB) for the application because I did not want to use a whole page just for a small calculator application. My question is can I still attach and run the OOB application from a website online without a user being able to download it? What is the procedure for deployment to a server? I''m assuming that once deployed to the server a link from the web page would enable running of the application? I''m a complete novice in this area so any advice would be much appreciated.
Kind regards
Will.

推荐答案

如果您查看托管应用程序的附加Web项目(在Visual Studio中),则将看到其中包含一些javascript和html.该页面来驱动您的SL应用.您必须将其作为部署服务器上的页面,因为该代码将SL运行时声明为页面DOM中的对象,并指示客户端浏览器在本地SL运行时中下载并运行您的应用.

您最终的xap总是 下载到客户端.要将其放置在网络上",您必须将xap上传到网络服务器.然后,宿主页面必须具有嵌入式SL运行时对象,该对象指向加载该页面时要运行的xap.用户将转到http://contoso.com/mySLapp.html转到该页面,该页面将在其客户端计算机上加载SL运行时.然后,SL运行时将调用下载并运行指定为对象参数的xap.

与OOB SL应用程序的区别在于,运行时不需要浏览器主机,并且用户必须明确授权安装(通过在浏览器中右键单击该应用程序).还有其他安全限制,但对于我的应用程序,我怀疑它们是否会发挥作用.

因此...直接回答您...您的应用程序自动是一个浏览器应用程序和一个OOB应用程序(假设您已将其设置为OOB),并且默认情况下可以以任何一种方式运行.您可以通过检测RunningOutOfBrowser属性并在浏览器中显示另一个接口来更改此行为.

HTH
If you look at the attached web project that hosts your app for testing (in Visual Studio), you will see that there is some javascript and html in that page to drive your SL app. You have to have that as a page on your deployment server as that code declares the SL runtime as a object in the page DOM and instructs the client browser to download and run your app in the local SL runtime.

Your final xap is always downloaded to the client. To put it "on the web" you have to upload the xap to a web server. Then the hosting page has to have the embedded SL runtime object which points to the xap you want to run when that page is loaded. A user would go to http://contoso.com/mySLapp.html to get to that page which, in turn, would load the SL runtime on their client machine. The SL runtime would then make the call to download and run the xap specified as a parameter to the object.

The difference with an OOB SL app is that the runtime does not require the browser host and the user must explicitly authorize the installation (via a right-click of the app in the browser). There are other security restrictions and such but for your app I doubt they will come into play.

So... to directly answer you... your app is automatically a browser app AND an OOB app (assuming you have made it OOB) and can be run either way by default. You can change this behavior by detecting the RunningOutOfBrowser property and presenting a different interface when in-browser.

HTH


这篇关于我仍然可以从网站上附加并运行Silverlight 5 OOB应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆