0

我创建了一个简单的Silverlight插件,用于调用WCF RIA服务来检索数据。在Windows 7计算机上开发并在VS2010 Cassini环境中运行时,此工作正常。无法在Windows XP计算机上开发WCF RIA服务

然而,我的笔记本电脑上运行我的应用程序,在Windows XP计算机与IIS 5.1,使我每次我无论是在卡西尼或托管IIS拨打服务从我的Silverlight插件的时间来得到一个错误:

System.ServiceModel.DomainServices.Client.DomainOperationException: Load operation failed for query 'GetInfo'. The remote server returned an error: NotFound. ---> System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult) at System.Net.Browser.BrowserHttpWebRequest.<>c_DisplayClass5.b_4(Object sendState) at System.Net.Browser.AsyncHelper.<>c_DisplayClass4.b_1(Object sendState) --- End of inner exception stack trace --- at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result) --- End of inner exception stack trace --- at System.ServiceModel.DomainServices.Client.WebDomainClient`1.EndQueryCore(IAsyncResult asyncResult) at System.ServiceModel.DomainServices.Client.DomainClient.EndQuery(IAsyncResult asyncResult) at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult) --- End of inner exception stack trace ---} System.Exception

如何在Windows XP上创建我的Silverlight和RIA Services环境?

环境:

的Windows XP

Visual Studio 2010中

的.NET Framework 4

的查询需要大约7秒钟将返回一个错误

RIA服务SDK已安装

RIA Services工具包安装

的Silverlight开发人员运行时安装

的Silverlight 4 SDK安装

回答

0

我已经解决了这个问题,但为什么这个服务我的Windows 7机器上工作,我一直没能确定。

问题是我在我正在检索的服务中的一个Linq to Sql类中伪造一个外键关系。基本上,我已经将Linq扩展为Sql类,以便拥有一个基于非官方外键值获取子记录的属性。当我的Silverlight应用程序尝试从服务中加载父对象时,它引用我创建的扩展属性时发生错误。

通过修改扩展属性,以便它不会对数据库进行新的调用,我能够成功地使用该服务。

什么给我一个提示,我可能不得不改变我的代码是一个警告消息,我在我的Visual Studio错误列表中看到。