SilverlightアプリケーションでWebサービス呼び出しが発生しました。パラメータの項目数が約2500になると失敗します。パラメータが特定の(小)番号を超えたときにサービスコールが失敗する
var pointIds = new System.Collections.ObjectModel.ObservableCollection<int>();
が、私はこのようにそれを呼び出す:
引数には、監視可能なコレクションとして宣言されて
client.ServiceClient.MarkAllPointAsFavouriteAsync(Settings.Current.User.UserId,pointIds);
とservicecallは次のように定義されています。
public void MarkAllPointAsFavourite(Guid userId, List<int> pointIds)
{
PointRepository.MarkAllPointAsFavourite(userId, pointIds);
}
はなぜ約2500の整数のリストを呼び出すと失敗しますか?
特定のエラーがある:約2500の整数のリストを呼び出すとき
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__DisplayClass4.<BeginOnUI>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.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
at Conwx.Net.Client.Framework.CustomerServiceReference.CustomerServiceClient.CustomerServiceClientChannel.EndMarkAllPointAsFavourite(IAsyncResult result)
at Conwx.Net.Client.Framework.CustomerServiceReference.CustomerServiceClient.Conwx.Net.Client.Framework.CustomerServiceReference.ICustomerService.EndMarkAllPointAsFavourite(IAsyncResult result)
at Conwx.Net.Client.Framework.CustomerServiceReference.CustomerServiceClient.OnEndMarkAllPointAsFavourite(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}
いいえ、非常に良い答えではありませんが、パラメータがもはや整数のリストではなく、リストを選択するための基礎となったフィルタになるように、サービスコールを書き換えました。 – Keller