如何将 3D Silverlight 5 Web 应用程序部署到第三方托管服务器?

发布于 2024-12-24 01:39:20 字数 2071 浏览 3 评论 0原文

我想做的就是

使用新发布的 Silverlight 5 和 Silverlight 5 Toolkit(2011 年 12 月) ),我想尝试将我的 3D Silverlight 测试应用程序部署到第三方托管服务器(在我的例子中是 AppHarbor,但我愿意接受其他选项)。

我的测试应用程序只是您创建新的 Silverlight 3D 应用程序时获得的默认 Silverlight 3D 应用程序:

看起来 AppHarbor(和大多数其他托管站点)要求您将所需的 Silverlight 5 DLL 复制到您的项目中,因为它们没有所需的 SDK/工具包安装在他们的服务器上。

理论上似乎很好,但我不知道如何使用 Silverlight 实际做到这一点。

问题 问题

有两个方面:

  1. 我不确定哪些 DLL 需要手动复制到我的项目中,并且我不确定应如何包含和引用它们。

  2. 经过一些实验,将一些 Silverlight XNA DLL 复制到我的项目中并引用本地项目 DLL(而不是 SDK 安装的和 Toolkit 安装的 DLL),基本 3D Silverlight 应用程序现在在我运行它时崩溃浏览器——本地。 (Silverlight 插件崩溃了。)在我开始摆弄引用和 DLL 之前,我没有这个问题;默认项目工作得很好。因此,我什至还没有部署到托管服务器,因为它不再在本地运行。

旁白

关于上面的后一点(Silverlight插件崩溃),这个问题似乎与3D Silverlight功能有关,这显然需要提升信任/权限——诚然,我不完全明白如何这一切都还有效。

一般来说 - 不管所有这些 DLL/引用摆弄 - 似乎我需要检查 Silverlight3dApp 项目属性中的“在浏览器中运行时需要提升信任”以使旋转的 3D 立方体应用程序显示在浏览器中。或者,如果我不选中该选项,我需要手动右键单击浏览器中的 Silverlight 5 应用程序,然后在“权限”选项卡上启用 3D 图形。 (旁注:我感兴趣的是,如果我部署了此功能,这将如何影响我的最终用户。他们是否必须以相同的方式手动调整权限?无论如何,这是另一天的问题。

)除此之外:

  1. 如果我将所有内容保留默认状态,Silverlight 插件不会崩溃
  2. 如果我将 Silverlight DLL 复制到项目中并在本地引用它们,则在启用 3D 权限时 Silverlight 插件会崩溃。
  3. 如果我将 Silverlight DLL 复制到项目中并在本地引用它们,则在禁用 3D 权限时 Silverlight 插件不会崩溃。

问题

是否有人成功部署了基本 Silverlight 5 3D 应用 到服务器没有安装 Silverlight 5(和 Silverlight 5 Toolkit)?

你是怎么做到的?需要将哪些文件复制到我的项目中并在本地引用?哪些参考文献(如果有)需要删除?

子问题:如果有人对提升信任/权限问题有任何见解,我也很想听听。

What I want to do

I've been playing around with the newly released Silverlight 5 and Silverlight 5 Toolkit (December 2011), and I would like to try deploying my 3D Silverlight test application to a third-party hosting server (AppHarbor in my case, but I'm open to other options).

My test application is simply the default Silverlight 3D application that you get when you create a new Silverlight 3D app:

It looks like AppHarbor (and most other hosting sites) require that you copy the required Silverlight 5 DLLs into your project, because they don't have the required SDKs/Toolkits installed on their servers.

Seems fine in theory, but I have no idea how to actually do this with Silverlight.

The problem

The problem is two-fold:

  1. I'm not sure exactly which DLLs need to be manually copied into my project, and I'm not sure how they should be included and referenced.

  2. After some experimentation with copying a few of the Silverlight XNA DLLs into my project and referencing the local project DLLs (instead of the SDK-installed and Toolkit-installed DLLs), the basic 3D Silverlight app now crashes when I run it in the browser -- locally. (The Silverlight plugin crashes.) I didn't have this problem before I started fiddling with the references and DLLs; the default project works just fine. So I haven't even gotten to deploying to a hosting server, because it no longer runs locally.

An aside

On the latter point above (Silverlight plugin crashing), the issue seems to be related to the 3D Silverlight functionality, which apparently requires elevated trust/permissions -- admittedly, I don't fully understand how that all works yet.

Generally speaking -- irrespective of all of this DLL/reference fiddling -- it seems like I need to check "Require elevated trust when running in-browser" in the Silverlight3dApp project properties to get the spinning 3D cube app to show up in the browser. Alternatively, if I leave that unchecked, I need to manually right-click the Silverlight 5 app in the browser and enable 3D graphics on the Permissions tab. (Side note: I'm interested in how this will effect my end-users if I ever do get this deployed. Will they have to manually adjust permissions in the same way? Anyway, that's a question for a different day.)

The point of this aside:

  1. The Silverlight plugin does not crash if I leave everything the way it is by default.
  2. If I copy the Silverlight DLLs into my project and reference them locally, the Silverlight plugin crashes if 3D permissions are enabled.
  3. If I copy the Silverlight DLLs into my project and reference them locally, the Silverlight plugin does not crash if 3D permissions are disabled.

The question

Has anyone successfully deployed that basic Silverlight 5 3D app to a server without Silverlight 5 (and the Silverlight 5 Toolkit) installed?

How did you do it? What files need to be copied into my project and referenced locally? Which references (if any) need to be removed?

Sub-question: If anyone has any insights about the elevated trust/permissions issue, I would love to hear those as well.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

如何视而不见 2024-12-31 01:39:20

对于 AppHarbor,我在 Silverlight 项目 (lib) 中创建一个文件夹,并复制我依赖的所有程序集,并使用“复制到输出”标记所有程序集。

接下来,我使用 subst 创建一个指向此文件夹的虚拟驱动器,并添加对该虚拟驱动器上的程序集的所有引用。 (AppHarbor 不需要这样做,但这样我就可以将代码签出到我想要的任何计算机上的任何文件夹,而不会弄乱路径)

请注意,您还需要将这些 dll 添加到存储库(git/mercurial),因为标准.hgignore 文件将跳过 *.dll 文件。

For AppHarbor I create a folder in the Silverlight project (lib) and copy all assemblies that I am dependent on and mark all the assemblies with copy to output.

Next I use subst to make a virtual drive that points to this folder and I add all the references to the assemblies on that virtual drive. (This is not needed for AppHarbor but this way I can check out my code to any folder on any machine I want without messing up the paths)

Note that you also need to add these dll's to the repository (git/mercurial) because a standard .hgignore file will skip the *.dll files.

我纯我任性 2024-12-31 01:39:20

您是否确认正在运行最新的 Silverlight 运行时?您是否安装了以前的开发人员运行时? http://www.microsoft.com/getsilverlight/get-started/install/

Have you verified you are running the latest runtime for Silverlight? Did you have a previous developer runtime installed? http://www.microsoft.com/getsilverlight/get-started/install/

云醉月微眠 2024-12-31 01:39:20

嗯...我将接受上面的答案。我正在使用最新的 Silverlight 5 运行时和 Silverlight 5 Toolkit,没有遇到任何问题。这是一个应用程序,我在 Silverlight 中加载 FBX 模型并为其设置动画(它确实需要您右键单击并设置权限)并且工作正常:

http://www.dustinhorne.com/necodecamp.html

顺便说一句,我正在考虑是要以更高的信任度运行还是强制用户允许 3D 加速。就我个人而言,从安全角度来看,我讨厌让整个应用程序只对 3D 内容提高信任度,但如果您想在浏览器外运行它,您可能无论如何都想这样做,并使用代码签名证书对应用程序进行签名。

Hmm... I'm going to go with the above answer. I'm using the latest Silverlight 5 runtime and Silverlight 5 Toolkit and have not had any issues. Here's an app where I'm loading and animating an FBX model in Silverlight (it does require you to right click and set the permissions) and it works fine:

http://www.dustinhorne.com/necodecamp.html

As an aside I'm wrestling with whether to run in elevated trust or force the user to allow 3D acceleration. Personally I hate making the whole app elevated trust just for the 3D stuff from a security standpoint, although if you want to run it out of browser you may want to do that anyway and sign the app with a code signing certificate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文