Silverlight的4.0 + 2.0 MVC + WCF RIA服务+ EF 4.0 =加载错误 [英] Silverlight 4.0 + MVC 2.0 + WCF RIA Services + EF 4.0 = Load Error

查看:115
本文介绍了Silverlight的4.0 + 2.0 MVC + WCF RIA服务+ EF 4.0 =加载错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图打造专业化与下列网站:

I'm trying to buid a site with the following:


  • VS 2010(更新后的WCF RIA服务)

  • 的Silverlight 4.0(打包带WCF RIA服务)。

  • MVC 2

  • EF 4.0

我设置它,以便面向公众的页面将是HTML代码MVC,但政府的部分将使用WCF RIA服务用于数据访问使用是Silverlight的导航应用。

I am setting it up so that the public facing pages will be html from MVC, but the administration portion will be a silverlight navigation application using using WCF RIA Services for data access.

当我创建一个web表单应用程序中的Silverlight应用程序,它工作(我可以添加一个DataGrid和检索使用EF 4.0和成功WCF RIA Services数据):

When I create the silverlight application within a webforms application, it works (I am able to add a datagrid and retrieve data using EF 4.0 and WCF RIA Services successfully):

当我创建一个应用程序MVC2内的Silverlight应用程序:

When I create the silverlight application within an MVC2 application:

我得到一个错误如下(我已在这两种情况下相同的数据网格 - 一个简单的表2的记录):

I get an error as follows (I've added the same datagrid in both cases - a simple table with 2 records):

在Web表单服务器端工作,而MVC服务器端没有。我已经尝试过失败登录WCF以及小提琴手,但我有点不能得到任何输出(使用这里的例子:的 http://msdn.microsoft.com/en-us/library/ms730064.aspx ),我也试着小提琴手,并且没有运气的一些信息。我真的这个挣扎,我不知道是否有人遇到了这个问题,并发现它周围的方式?

The webforms server-side works while the MVC server side doesn't. I've unsuccessfully tried WCF logging as well as fiddler, but I somehow can't get any output (using the example here: http://msdn.microsoft.com/en-us/library/ms730064.aspx), and I've also tried fiddler to get some information with no luck. I'm really struggling with this and I wonder if anyone else has run into this issue and found a way around it?

谢谢,丹尼斯

推荐答案

此问题可能是具体到我的网站,但也许其他人有同样的问题,我已经被这一点,我已经放弃了这么混账的沮丧一会儿,尝试过其他方法来得到完成我想要的东西,但回来的Silverlight,因为我有一个很难用JavaScript和JS UI库。在部署的站点上工作时(与开发服务器工作时,我没有得到任何输出)。

This issue might be specific to my site, but perhaps other people are having the same issue, and I had been so darn frustrated by this that I had given up for a while and tried other methods to get done what I wanted, but came back to Silverlight because I have a hard time with Javascript and JS UI libraries. I had better luck with fiddler when working on the deployed site (I didn't get any output when working with the development server).

当我浏览到我的网站使用Silverlight应用程序时,对话框弹出与通常的加载操作失败的查询......,和小提琴手呈现以下几个突出的错误时:

When I browsed to my site with the silverlight app, the dialog popped up with the usual "load operation failed for query...", and fiddler showed the following when highlighting the error:

IIS指定的认证方案基本,无名氏',但绑定仅支持只有一个认证方案的规范。有效的身份验证方案是摘要,协商,NTLM,基本或匿名。这样只使用一个单一的身份验证方案更改IIS设置。

IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.

我抬头在DiscountASP.net(我的托管服务提供商)这个错误,发现指示我更新的web.config(对于IIS7)如下知识库文章:

I looked up this error in the DiscountASP.net (my hosting provider) and found a KB article that instructed me to update the web.config (for IIS7) as follows:

<system.webServer>
  <security>
    <authentication>
      <basicAuthentication enabled="false" />
    </authentication>
  </security>
</system.webServer>

和中提琴!我可以在asp.net MVC2使用WCF RIA服务与Silverlight!我也发现,这是不必要的,因为在几个博客帖子描述为我创建一个特殊的服务和domainhostfactory,同时研究这个东西,或者更改路由,以避免与MVC和服务请求交互。这是我必须做的。

And viola! I could use WCF RIA Services with Silverlight in asp.net MVC2! I found also that it was unnecessary for me to create a special service and a domainhostfactory as described in several blog posts while researching this stuff, or change the routing to avoid interactions with MVC and the service request. This is all I had to do

我想这是一个pretty基本修复,并希望这会帮助别人。我是这个非常沮丧,而失望的,这样一个简单的解决方法是公开的,还没有一步一步的为这种情况说明,从微软给出,因为这是采用最先进最新的微软技术。

I guess this is a pretty basic fix, and hopefully it'll help someone else. I was extremely frustrated with this, and dissapointed that such a simple fix is publicly available, yet no step-by-step instructions for this scenario is given from Microsoft as this is using the most up-to-date microsoft technologies.

谢谢,丹尼斯

这篇关于Silverlight的4.0 + 2.0 MVC + WCF RIA服务+ EF 4.0 =加载错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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