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. C#
  4. Bad Request!

Bad Request!

Scheduled Pinned Locked Moved C#
databasesysadmindata-structureshelp
5 Posts 3 Posters 0 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.
  • S Offline
    S Offline
    Sabry1905
    wrote on last edited by
    #1

    Hello All I am updating a database on a server using a web service, the web service, my program is reading a large text files in my local machine and every 1000 line send them as an array of type string to the web service method that accepts string array , it runs will for a while but after 2 or min it gives me an exception "The request failed with HTTP status 400: Bad Request" can any one help on this plz!

    G S 2 Replies Last reply
    0
    • S Sabry1905

      Hello All I am updating a database on a server using a web service, the web service, my program is reading a large text files in my local machine and every 1000 line send them as an array of type string to the web service method that accepts string array , it runs will for a while but after 2 or min it gives me an exception "The request failed with HTTP status 400: Bad Request" can any one help on this plz!

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Does the request exceed the default limit of 4 MB?

      --- single minded; short sighted; long gone;

      S 1 Reply Last reply
      0
      • G Guffa

        Does the request exceed the default limit of 4 MB?

        --- single minded; short sighted; long gone;

        S Offline
        S Offline
        Sabry1905
        wrote on last edited by
        #3

        I don't know exactly what you mean, but if you mean the size of the string array, I had used a string array that contains 1000 line and another one that uses 100 line from the txt file, and both give me the same result.

        1 Reply Last reply
        0
        • S Sabry1905

          Hello All I am updating a database on a server using a web service, the web service, my program is reading a large text files in my local machine and every 1000 line send them as an array of type string to the web service method that accepts string array , it runs will for a while but after 2 or min it gives me an exception "The request failed with HTTP status 400: Bad Request" can any one help on this plz!

          S Offline
          S Offline
          Stefan Prodan
          wrote on last edited by
          #4

          Get ProcessExplorer or a similar tool and monitor the asp.net process that is running your webservice, I think that IIS is restarting the process due to large amount of RAM usage. I got the same error uploading large files by calling a webservice, chunk by chunk. A solution is to use free the memory from time to time by calling the Garbage Collector.

          http://stefanprodan.wordpress.com

          S 1 Reply Last reply
          0
          • S Stefan Prodan

            Get ProcessExplorer or a similar tool and monitor the asp.net process that is running your webservice, I think that IIS is restarting the process due to large amount of RAM usage. I got the same error uploading large files by calling a webservice, chunk by chunk. A solution is to use free the memory from time to time by calling the Garbage Collector.

            http://stefanprodan.wordpress.com

            S Offline
            S Offline
            Sabry1905
            wrote on last edited by
            #5

            How can i call the Garbage Collector on the server machine, i am running my application on a client machine all i can do is to call the web service on the server, plz help

            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