简体   繁体   English

在IIS 7问题上托管Silverlight视频播放器

[英]Hosting Silverlight Video Player On IIS 7 Issue

I am trying to host an ASP.NET application that is running the Silverlight Video Player . 我正在尝试托管运行Silverlight视频播放器的ASP.NET应用程序。 I have recently deployed this application to a fresh Windows Server 2008 Virtual PC. 我最近已将此应用程序部署到新的Windows Server 2008 Virtual PC。 I have installed the Silverlight plug-in as well as the Silverlight 2 SDK on the server (and the .NET Framework 3.5 SP1). 我已经在服务器(和.NET Framework 3.5 SP1)上安装了Silverlight插件以及Silverlight 2 SDK。

When I try to browse to this site, the Video Player should load and show me the video. 当我尝试浏览该站点时,视频播放器应加载并显示视频。 However, the behavior I am seeing is that a "block" of whitespace is layed-out, but I do not see the Video or Player load. 但是,我看到的行为是布局了一个“块”空白,但是我没有看到“视频”或“播放器”加载。 On a separate Vista machine, the application works when hosted in the Visual Studio IIS Server "Cassini." 在单独的Vista计算机上,将应用程序托管在Visual Studio IIS服务器“ Cassini”中后即可工作。 The application is built in .NET 3.5 SP1. 该应用程序内置于.NET 3.5 SP1中。

Does anyone have any ideas about why the Silverlight player is not working? 有人对Silverlight播放器为什么不工作有任何想法吗? The content to load is included in the project and referenced using the "~/" syntax. 要加载的内容包含在项目中,并使用“〜/”语法引用。

Do you know if the Silverlight plug-in is even loading your app? 您是否知道Silverlight插件是否甚至正在加载您的应用程序? (Can you put a breakpoint in App.xaml.cs:Application_Startup?) (可以在App.xaml.cs:Application_Startup中放置一个断点吗?)

If not, have you checked to make sure that your IIS server has the mime type for XAP files? 如果不是,是否检查以确保IIS服务器具有XAP文件的mime类型?

The minimum requirements for hosting a Silverlight app: 托管Silverlight应用程序的最低要求:

  1. Any Web Server 任何Web服务器
  2. Mime type for XAP files is set up. 设置XAP文件的Mime类型。

Some things to consider when troubleshooting this problem: 解决此问题时要考虑的一些事项:

  • Is the XAP file getting to the client? XAP文件是否到达客户端?
  • Can you right-click on the "block of whitespace" and get the Silverlight menu? 您可以右键单击“空白块”并获得Silverlight菜单吗?
  • Do you see the XAP file getting sent via the server? 您是否看到XAP文件通过服务器发送? (Try fiddler or firebug to see the traffic) (尝试提琴手或萤火虫查看流量)
  • If the Silverlight app is, indeed getting to the client, then you should try attaching a debugger. 如果Silverlight应用确实在连接到客户端,则应尝试附加调试器。 Attach your debugger to your browser, and you should be able to debug the Silverlight app to figure it out. 将调试器连接到浏览器,您应该能够调试Silverlight应用程序以解决问题。

The issue was caused by the fact that I was deploying the site to an "Application Directory" under the default web site on Windows Server 2008. Therefore, the relative link to the .XAP file was not resolving correctly. 该问题是由于我将网站部署到Windows Server 2008上默认网站下的“应用程序目录”而引起的。因此,指向.XAP文件的相对链接无法正确解析。 I fixed the issue by deploying the web site to the root of the default web site, which works fine for me. 我通过将网站部署到默认网站的根目录来解决此问题,这对我来说很好。

Going through Brian's suggestions were very helpful in resolving this: 1. Can you right-click on the "block of whitespace" and get the Silverlight menu? 解决Brian的建议对解决此问题非常有帮助:1.您可以右键单击“空白块”并获得Silverlight菜单吗? In my case, I could. 就我而言,我可以。 2. Is the XAP file getting to the client? 2. XAP文件是否到达客户端? You can check the Temporary Internet Files from a client machine to see if it is getting downloaded. 您可以从客户端计算机检查Internet临时文件,以查看是否已下载该文件。 Mine was not at this point. 我的不是这个时候。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM