문제

I have created a simple Silverlight Plugin that makes a call to a WCF RIA Service to retrieve data. This works fine when developing on a Windows 7 machine and running it in the VS2010 Cassini environment.

However, running my application on my laptop computer, a Windows XP machine with IIS 5.1, causes me to get an error every time I call the service from my Silverlight Plugin either in Cassini or in hosted IIS:

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

How can I make my Silverlight and RIA Services environment on Windows XP?

Environment:

Windows XP

Visual Studio 2010

.NET Framework 4

The query takes about 7 seconds to return an error

RIA Services SDK installed

RIA Services Toolkit installed

Silverlight Developer Runtime installed

Silverlight 4 SDK installed

도움이 되었습니까?

해결책

I have resolved this issue but I have not been able to determine why this service worked on my Windows 7 machine.

The problem was that I was faking a foreign key relationship in one of my Linq to Sql classes that I was retrieving in the service. Basically, I had extended the Linq to Sql class to have a property that fetched child records based on the unofficial foreign key value. When my Silverlight application tried to load the parent object from the service, it gave an error when referencing the extended property that I created.

By modifying the extension property so that it did not make a new call to the database I was able to successfully use the service.

What gave me a tip that I might have to change my code was a Warning message that I saw in my Visual Studio error list.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top