Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Error:The request failed with HTTP status 400: Bad Request

Error:The request failed with HTTP status 400: Bad Request

Scheduled Pinned Locked Moved .NET (Core and Framework)
help
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AshSah
    wrote on last edited by
    #1

    Hi All, Would someone plese tell me what the error :"The request failed with HTTP status 400: Bad Request" means. I am getting this when I try to send huge amount of data to web service. Regards, Ash.

    P T 3 Replies Last reply
    0
    • A AshSah

      Hi All, Would someone plese tell me what the error :"The request failed with HTTP status 400: Bad Request" means. I am getting this when I try to send huge amount of data to web service. Regards, Ash.

      P Offline
      P Offline
      paresh_joe
      wrote on last edited by
      #2

      Hi, Even i am getting same kind of error .. but no one has replied yet :(

      1 Reply Last reply
      0
      • A AshSah

        Hi All, Would someone plese tell me what the error :"The request failed with HTTP status 400: Bad Request" means. I am getting this when I try to send huge amount of data to web service. Regards, Ash.

        T Offline
        T Offline
        The Nightcoder
        wrote on last edited by
        #3

        The error just means that the web service for some reason didn't like the request. Specifically, it may mean that the web service: a) can't understand your request (bad headers/bad encoding/bad data). b) has failed when processing your data (due to a bug or bad data). c) doesn't accept your request (invalid data, too much data or whatever other rule it may enforce). So as you see, the reasons can be infinitely many, and there is no simple answer. You may be doing something wrong, the web service may be doing something wrong or there may be a problem on the way (corrupting the request). It's almost impossible to debug without carefully analyzing the entire raw request (including HTTP headers) and/or debugging the web service itself. If you didn't create the web service you could try sending the request to a fake web service you create and capture it there - then you have to analyze it for correctness somehow (proof-reading it or building a program that analyzes it) and finally, if you're certain it's correct, contact the ones responsible for the web service. I think I remember seeing it intermittently in .NET 1.1 due to some bug or quirk (the request headers sometimes were incorrectly generated by the framework). Both the web service and consumer were built in .NET, and the error occured before my (web service) code even saw the request. Spent hours of fruitless debugging before I found the bug on Google... Haven't heard about that in a long time though - I think it got fixed in an early service pack.

        Peter the small turnip (1) It Has To Work. --RFC 1925[^]

        1 Reply Last reply
        0
        • A AshSah

          Hi All, Would someone plese tell me what the error :"The request failed with HTTP status 400: Bad Request" means. I am getting this when I try to send huge amount of data to web service. Regards, Ash.

          T Offline
          T Offline
          The Nightcoder
          wrote on last edited by
          #4

          One more thought: You say "huge amount of data"... could it be that the web service has a limit on the amount of data it accepts and you are exceeding it? That would qualify as a "bad request"...

          Peter the small turnip (1) It Has To Work. --RFC 1925[^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups