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錯誤列表中看到。