错误4004,Silverlight 4 WCF RIA与远程数据库

时间:2010-11-22 20:39:58

标签: silverlight-4.0 wcf-ria-services

虽然我尝试使用WCF RIA加载silverlight应用程序的数据,但收到错误 吼叫。

消息:Silverlight应用程序中未处理的错误

代码:4004

类别:ManagedRuntimeError

消息:System.ServiceModel.DomainServices.Client.DomainOperationException:查询的加载操作失败

我正在使用远程数据库,它正确验证用户,连接数据库但数据绑定失败。代码:

    public MainPage()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(MainPage_Loaded);
        }

 void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            // create a context to the WCF RIA service and call the RIA service method
            // to get the list of all customers.
            var context = new ExpertIssueTracker.Web.ITDomainContext();
            dataGrid1.ItemsSource = context.IT_USERs;
            context.Load(context.GetIT_USERQuery());
        }

我试过fiddler,但无法弄清楚确切的原因。连接到远程托管数据库时,我们有任何具体问题吗?

1 个答案:

答案 0 :(得分:0)

好的,我知道了,问题在于共享托管。他们正在运行.Net4 beta。