locked
Error while upload: The remote server returned an error: (400) Bad Request. RRS feed

  • Question

  • Hi,

    I am getting the error: The remote server returned an error: (400) Bad Request.  while uploading data from mobile device to SQL Azure.  maxReceivedMessageSize in config is set to max, so that could not be the issue.

    Here is the trace:

    System.Net.WebException -> The remote server returned an error: (400) Bad Request.
     bij System.Net.HttpWebRequest.finishGetResponse()
    bij System.Net.HttpWebRequest.GetResponse()
    bij Microsoft.Samples.Synchronization.ClientServices.HttpCacheRequestHandler.ProcessUploadRequest(HttpWebRequest webRequest, CacheRequest request)
    bij Microsoft.Samples.Synchronization.ClientServices.HttpCacheRequestHandler.ProcessCacheRequest(CacheRequest request)
    bij Microsoft.Samples.Synchronization.ClientServices.CacheController.Refresh(Boolean routeCompleted)

    We have installed SSL and updated the web.config for the same. Any special setting needs to be done?

    But this error is not coming all the time, coming randomly only.

    Please advise.

    Thanks & Regards

    Kakali Gupta


    Kakali Gupta

    Wednesday, June 20, 2012 9:15 AM

Answers

  • Well, I solved this one.

    Somehow WCF was not reading the config. After adding the services again, it started working.


    Kakali Gupta

    • Marked as answer by Kakali Gupta Friday, July 6, 2012 4:12 AM
    Friday, July 6, 2012 4:12 AM

All replies

  • you might want to enable diagnostic logging to get a more detailed error.
    Wednesday, June 20, 2012 10:20 AM
  • Hi,

    I have checked Azure log, no error reported there. It's happening in the device only. Should I need to increase reader quota also in WCF config?

    Thanks & Regards

    Kakali Gupta


    Kakali Gupta

    Wednesday, June 20, 2012 10:44 AM
  • im referring to the sync services diagnostic logging just in case you can still enable it.

    no harm in increasing the quota though.

    Wednesday, June 20, 2012 10:56 AM
  • Hi,

    It's already enabled in server side. Is there any way to enable it in client also?

    Thanks & Regards

    Kakali Gupta


    Kakali Gupta

    Wednesday, June 20, 2012 11:27 AM
  • for the wcf config, can you try enabling includeExceptionDetailInFaults ?

    Wednesday, June 20, 2012 11:42 AM
  • Ok, I will put that also.

    Actually I tried to upload the same feed through Fiddler, and found that it's because of huge data. I have configured WCF for max, still not able to upload the same.

    Is there any way to buffer/batch the data. If I set the batching enable, should I need to batchspooldirectory also? This would not be possible in Azure.


    Kakali Gupta

    Thursday, June 21, 2012 4:08 AM
  • i suggest you have a look at what inner exception it returns first to see what's really causing the error.
    Thursday, June 21, 2012 5:33 AM
  • Inner exception is not giving any extra details, only stack trace of the same error: The remote server returned an error: (400) Bad Request.

    Kakali Gupta

    Thursday, June 21, 2012 5:58 AM
  • Hi,

    Do I need to specify anything on clicent (mobile device app) for uisng SSL in server side?


    Kakali Gupta

    Thursday, June 21, 2012 6:15 AM
  • Well, I solved this one.

    Somehow WCF was not reading the config. After adding the services again, it started working.


    Kakali Gupta

    • Marked as answer by Kakali Gupta Friday, July 6, 2012 4:12 AM
    Friday, July 6, 2012 4:12 AM