[英]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
文件夹下加载Zip
和Xap
文件,通常它会在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.