简体   繁体   English

错误:无法下载silverlight应用程序。检查Web服务器设置

[英]Error: Could not download silverlight application. Check web server settings

Developing a silverlight page in already existing web application for previewing video files. 在现有的Web应用程序中开发Silverlight页面以预览视频文件。 When I create a asp.net application locally and add silverlight application on the solution it works perfectly. 当我在本地创建一个asp.net应用程序并在解决方案上添加silverlight应用程序时,它可以完美运行。 But while I am trying to include into already existing project it throws this error. 但是当我试图包含到已经存在的项目中时,它会抛出此错误。 I have not deployed into the IIS. 我还没有部署到IIS中。 this happens while debugging. 这在调试时发生。

Check the path to your xap file in your webpage. 检查网页中xap文件的路径。 It should be something like: 它应该是这样的:

 /ClientBin/my.xap

Also ensure that your xap file is actually in the ClientBin folder. 还要确保您的xap文件实际位于ClientBin文件夹中。 In the web application Properties , choose the Silverlight Applications tab and add the silverlight project to the list. 在Web应用程序“ Properties ,选择“ Silverlight Applications选项卡,然后将silverlight项目添加到列表中。

Although probably not applicable in your case, this can also occur if you are using iis and haven't registered the correct mime type for .xap files. 虽然可能在您的情况下不适用,但如果您使用的是iis并且没有为.xap文件注册正确的mime type ,也会发生这种情况。 It should be set to application/x-silverlight-app . 它应该设置为application/x-silverlight-app

This is little same with another answer, but I give my detailed solution with image of setting. 这与另一个答案不太一样,但我给出了我的详细解决方案与设置的图像。

In my case, one of my aspx page will load Zip and Xap files under ClientBin Folder, normally it'll load 20 Zip/Xap files under ClientBin\\ , 在我的情况下,我的一个aspx页面将在ClientBin文件夹下加载ZipXap文件,通常它会在ClientBin\\下加载20个Zip/Xap文件,

But I found that when building/publishing the project, the Zip/Xap files are NOT output to ClientBin\\ , that is ClientBin folder is nearly empty. 但我发现在构建/发布项目时, Zip/Xap文件不输出到ClientBin\\ ,即ClientBin文件夹几乎为空。

So my solution is to let the Zip/Xap files output to ClientBin\\ , to do this, the setting way can see this article: 所以我的解决方案是让Zip/Xap文件输出到ClientBin\\ ,为此,设置方式可以看到这篇文章:

https://social.msdn.microsoft.com/Forums/silverlight/en-US/d8e2c92a-4b31-4e4b-a440-4960a8d475b4/how-to-generate-xap-file?forum=silverlightstart https://social.msdn.microsoft.com/Forums/silverlight/en-US/d8e2c92a-4b31-4e4b-a440-4960a8d475b4/how-to-generate-xap-file?forum=silverlightstart

Besides here is the screenshot of my setting, that is Right click at your Silverlight project > Properties > Silverlight Application , and you can click the Add button to add content, 除此之外是我的设置的屏幕截图,即Right click at your Silverlight project > Properties > Silverlight Application ,您可以单击添加按钮添加内容,

在此输入图像描述

暂无
暂无

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

相关问题 无法下载Silverlight应用程序。 似乎不是MIME类型问题 - Could not download Silverlight application. Does not appear to be MIME type issue (“/”应用程序中的服务器错误。找不到文件)Windows Azure 中的错误 - (Server Error in '/' Application. Could not find file )error in Windows Azure '/'应用程序中的服务器错误。 System.Web.Http.WebHost - Server Error in '/' Application. System.Web.Http.WebHost “ /”应用程序中的服务器错误。 与视图 - Server Error in '/' Application. with View 应用程序中的异常服务器错误。 编译错误 - Unhandel Server Error in Application. Compilation Error “'''应用程序中的服务器错误。 无法在ASP .NET C#中找到路径的一部分 - “Server Error in '/' Application. Could not find a part of the path” in ASP .NET C# “ /”应用程序中的服务器错误。 在c#.net - Server Error in '/' Application. in c#.net “ /”应用程序中的服务器错误。 未安装打印机 - Server Error in '/' Application. No printers are installed “ /”应用程序中的服务器错误。 尚无此类主机 - `Server Error in '/' Application. No such host is known 新手出现错误“'/'应用程序中的服务器错误。 无法加载文件或程序集“Pappa Bob's Pizza”或其依赖项之一。” - Newbie has error “Server Error in '/' Application. Could not load file or assembly '”Pappa Bob's Pizza“' or one of its dependencies.”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM