locked
{"The remote server returned an error: (400) Bad Request."} RRS feed

  • Question

  •  

    I have a Synconaziation over WCF and now it all I get is this error.

    {"The remote server returned an error: (400) Bad Request."}

    I got this yesterday but it disapeared and now it reapeard again.

    Enyone?


    Server stack trace:
       at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException)
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ClientReliableChannelBinder`1.RequestClientReliableChannelBinder`1.OnRequest(TRequestChannel channel, Message message, TimeSpan timeout, MaskingMode maskingMode)
       at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout, MaskingMode maskingMode)
       at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Leguan.Client.Synchronization.SynchronizationService.ILeguanSyncService.ApplyChanges(SyncGroupMetadata groupMetadata, DataSet dataSet, SyncSession syncSession)
       at Leguan.Client.Synchronization.SynchronizationService.LeguanSyncServiceClient.ApplyChanges(SyncGroupMetadata groupMetadata, DataSet dataSet, SyncSession syncSession) in C:\Users\Christer\Documents\Visual Studio 2008\Projects\Leguan\Leguan\Leguan 2.0\Leguan.Client.Synchronization\Service References\SynchronizationService\Reference.cs:line 59

    • Moved by Max Wang_1983 Friday, April 22, 2011 7:24 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Saturday, May 24, 2008 1:42 PM

Answers

  •  

    I found the problem. It was the readerQuotas. I missed that.

    /Christer

    Wednesday, May 28, 2008 12:56 PM

All replies

  • Is there any inner exception ?

    could you post your code snippet here ?

     

    thanks

    Yunwen

    Monday, May 26, 2008 3:57 AM
    Moderator
  • That is my inner exception. I get a TargetOfInvokationException on my syncAgent.Synchronize();

    And this is only happens if I try to upload 58 or more rows in a table with SyncDirection.Bidirectional.

     

    The table contains:

    3 uniqueidentifyer

    1 bit

    2 int

    1 tinyint

    13 float

    3 datetime

     

     

    /Christer

     

    Tuesday, May 27, 2008 4:37 PM
  •  

    I found the problem. It was the readerQuotas. I missed that.

    /Christer

    Wednesday, May 28, 2008 12:56 PM
  •  

    We're getting the same 400 Bad Request errors for large sync requests.

     

    Do you mind posting the WCF service and the WCF client configuration settings you've used.

     

    Thanks in advance.

     

    Friday, June 6, 2008 12:12 AM
  • Hi, I had a similar problem by producing very large sync requests with images

    Maybe http streaming could resolve your issue (it resolved mine):
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3470866&SiteID=1

    Regards
    Oliver
    Sunday, June 15, 2008 4:40 PM