Silverlight的2104错误瓦特/ MVC项目作为主机 [英] Silverlight 2104 Error w/ MVC project as Host

查看:138
本文介绍了Silverlight的2104错误瓦特/ MVC项目作为主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有,当我在主持的MVC我的网站Silverlight控件中出现的非常奇怪的错误2104

I have a really odd 2104 error occurring when I am hosting a Silverlight control in my MVC site.

如果我去 http://mywebsite.com/SomeController 那么Silverlight应用程序将正确加载。
但是,如果我去 http://mywebsite.com/SomeController/Index 则无法加载和我得到的2104错误。我试着操作名称更改为其他指数的东西,但仍没有运气。

If I go to http://mywebsite.com/SomeController then the Silverlight application will load correctly. However, if I go to http://mywebsite.com/SomeController/Index then it fails to load and I get the 2104 error. I tried to change the Action name to something other than index, but still no luck.

现在,它只是样板Silverlight控件code,但我需要一些initParams在添加到它,所以我需要我的行动看起来像的 http://mywebsite.com/SomeController/Index/1/2

Right now, it's just boilerplate Silverlight control code, but I need to add some initParams to it, so I need my action to look like http://mywebsite.com/SomeController/Index/1/2

有没有人有什么可能会导致这什么想法?

Does anyone have any ideas on what could be causing this?

推荐答案

code 2104是无法下载Silverlight应用程序检查Web服务器设置。
<一href=\"http://blogs.msdn.com/b/silverlight_sdk/archive/2009/07/08/silverlight-plug-in-error-messages.aspx\"相对=nofollow> $的名单C $ CS在这里。

Code 2104 is "Could not download the Silverlight application. Check web server settings". List of codes are here.

您可能使用了相对URL为你的Silverlight对象,它不能正确解析,如果你是在一个子目录中。

You are likely using a relative URL for your silverlight object, which doesn't resolve correctly if you are in a subdirectory.

使用波浪线语法正确指向你的Silverlight对象:

Use the tilde syntax to correctly point to your silverlight object:

<param name="source" value="<% = Url.Content("~/ClientBin/MySilverlightThing.xap") %>"/>

这篇关于Silverlight的2104错误瓦特/ MVC项目作为主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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