我一次又一次得到LoadOperation失败

时间:2011-03-16 03:28:00

标签: silverlight silverlight-4.0 wcf-ria-services

我不知道为什么,但有时负载操作成功,有时却没有。是因为许多(6-7)请求同时发出?所有get次查询偶尔会失败。这是错误之一: -

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; Tablet PC 2.0; .NET4.0C; .NET4.0E)
Timestamp: Wed, 16 Mar 2011 03:22:10 UTC


Message: Unhandled Error in Silverlight Application 
Code: 4004    
Category: ManagedRuntimeError       
Message: System.ServiceModel.DomainServices.Client.DomainOperationException: Load operation failed for query 'GetSiteTerms'. 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.<EndGetResponse>b__4(Object sendState)
   at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(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 ---
   at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
   at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)
   at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
   at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )     

Line: 76
Char: 13
Code: 0
URI: http://localhost:9090/Default.aspx

Ria服务是不稳定还是我需要在Sql server的设置中进行一些更改?

提前致谢:)

2 个答案:

答案 0 :(得分:2)

“未找到”例外在“一般保护错误”之后无利可图获得第二名。这可能是一些问题都隐藏在那个难以捉摸的“未找到”堡垒背后。

最常发生的事情是因为WCF服务调用返回了HTTP结果4xx或5xx。然后,Silverlight生成的异常无助于调试问题。但是你不需要Silverlight来帮助 - 毕竟问题是服务器端。如果你启动Fiddler,你将能够看到Silverlight客户端和服务器之间的流量。在那里,您还可以通过确切的异常消息和堆栈跟踪查看确切的服务器响应。

尝试使用"How to Permanently Banish Silverlight’s “Not Found” Error for WCF Service Calls"中的提示使Silverlight错误更加可口。

答案 1 :(得分:2)

我正在与这个错误斗争2天,并弄清楚问题是什么...... 默认情况下,当您尝试加载数据源时,它只能处理64K数据....当您找不到这意味着大小超过64k时......尝试复制表,将行数减少到10-15(只是测试)并尝试执行应用程序它将正常工作......