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. Web Development
  3. ASP.NET
  4. Webservice fileupload timeout

Webservice fileupload timeout

Scheduled Pinned Locked Moved ASP.NET
9 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.
  • C Offline
    C Offline
    circle driver
    wrote on last edited by
    #1

    (I'm from germany but I try my best speaking english) Hello everybody, We are currently developing a webpage where people can upload pictures. Therefor we created an asp.net webservice to be able to upload pictures from various clients and operating systems via soap. This webservice has an "upload(byte[] b)" method. I'm currently working on a C# client. When uploading small files with a size of about 5kb, everything works perfect, but when I try to upload pictures in full size (which is 800x600 at about 40kb) upload sometimes fails due to timeout, although I set the time to 60 seconds, which is definitly enough. The maxRequestLength and requestLengthDiskThreshold are big enough. I wonder if there's another limitation which I have to edit (web.config, IIS, firewall) or if the problem is something different. The webservice runs on win 2003 server and the client on win xp Thanks in advance

    Y C 2 Replies Last reply
    0
    • C circle driver

      (I'm from germany but I try my best speaking english) Hello everybody, We are currently developing a webpage where people can upload pictures. Therefor we created an asp.net webservice to be able to upload pictures from various clients and operating systems via soap. This webservice has an "upload(byte[] b)" method. I'm currently working on a C# client. When uploading small files with a size of about 5kb, everything works perfect, but when I try to upload pictures in full size (which is 800x600 at about 40kb) upload sometimes fails due to timeout, although I set the time to 60 seconds, which is definitly enough. The maxRequestLength and requestLengthDiskThreshold are big enough. I wonder if there's another limitation which I have to edit (web.config, IIS, firewall) or if the problem is something different. The webservice runs on win 2003 server and the client on win xp Thanks in advance

      Y Offline
      Y Offline
      Yusuf
      wrote on last edited by
      #2

      circle-driver wrote:

      although I set the time to 60 seconds,

      Where did you set your timeout? Look Here[^] and here[^] ( see the timeouts section )

      Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

      R C 3 Replies Last reply
      0
      • Y Yusuf

        circle-driver wrote:

        although I set the time to 60 seconds,

        Where did you set your timeout? Look Here[^] and here[^] ( see the timeouts section )

        Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

        R Offline
        R Offline
        Rajeesh MP
        wrote on last edited by
        #3

        if u r increasing this values in web config....your session will not timeout Regards Rajeesh MP modified on Thursday, April 9, 2009 1:05 AM

        C 1 Reply Last reply
        0
        • Y Yusuf

          circle-driver wrote:

          although I set the time to 60 seconds,

          Where did you set your timeout? Look Here[^] and here[^] ( see the timeouts section )

          Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

          C Offline
          C Offline
          circle driver
          wrote on last edited by
          #4

          Client:

          UploadService.Service myService = new UploadService.Service();
          myService.Timeout = 60000;//I used 120000 before, but I was bored of waiting 120 seconds to make sure it really times out

          Webservice(web.config):

          <httpRuntime maxRequestLength="2048" executionTimeout="120" requestLengthDiskThreshold="tried different numbers" />

          Since some pictures upload within a few seconds and others timeout after 60 seconds although they only have a slightly different size I guess there has to be another reason. To make sure I give you all information you might need, here's how I created the proxy class in case it's important.

          Wsdl /language:cs /protocol:soap /namespace:UploadService /out:UploadService.cs http://ip.ip.ip.ip/UploadService.asmx

          R 1 Reply Last reply
          0
          • R Rajeesh MP

            if u r increasing this values in web config....your session will not timeout Regards Rajeesh MP modified on Thursday, April 9, 2009 1:05 AM

            C Offline
            C Offline
            circle driver
            wrote on last edited by
            #5

            How do you know it does not time out? I don't know how the request is handled inside of the framework, but when we were making a java client and writing the soap-handler-class on our own with sockets and streams, the requests timed out, because we did some miscalculation on "Content-Length" and the Server waited for more, thus a bigger waiting-time wouldn't help. Nevertheless I will give it a try and use extreme large values to make sure it doesn't help (No offence!).

            1 Reply Last reply
            0
            • C circle driver

              Client:

              UploadService.Service myService = new UploadService.Service();
              myService.Timeout = 60000;//I used 120000 before, but I was bored of waiting 120 seconds to make sure it really times out

              Webservice(web.config):

              <httpRuntime maxRequestLength="2048" executionTimeout="120" requestLengthDiskThreshold="tried different numbers" />

              Since some pictures upload within a few seconds and others timeout after 60 seconds although they only have a slightly different size I guess there has to be another reason. To make sure I give you all information you might need, here's how I created the proxy class in case it's important.

              Wsdl /language:cs /protocol:soap /namespace:UploadService /out:UploadService.cs http://ip.ip.ip.ip/UploadService.asmx

              R Offline
              R Offline
              Rajeesh MP
              wrote on last edited by
              #6

              maxRequestLength=".........." executionTimeout="....." you give a big number

              1 Reply Last reply
              0
              • C circle driver

                (I'm from germany but I try my best speaking english) Hello everybody, We are currently developing a webpage where people can upload pictures. Therefor we created an asp.net webservice to be able to upload pictures from various clients and operating systems via soap. This webservice has an "upload(byte[] b)" method. I'm currently working on a C# client. When uploading small files with a size of about 5kb, everything works perfect, but when I try to upload pictures in full size (which is 800x600 at about 40kb) upload sometimes fails due to timeout, although I set the time to 60 seconds, which is definitly enough. The maxRequestLength and requestLengthDiskThreshold are big enough. I wonder if there's another limitation which I have to edit (web.config, IIS, firewall) or if the problem is something different. The webservice runs on win 2003 server and the client on win xp Thanks in advance

                C Offline
                C Offline
                circle driver
                wrote on last edited by
                #7

                I have new interesting and weird information for you. Most of the bytes uploaded reach the Server and when the request times out or if I kill the client after some seconds (no difference) the bytes get written into the file and the picture looks like crap in the lower part. I tried it three times with the same pic which has 113919 bytes. On server side I once counted 113094 and twice 113318 bytes. For some reason those last bytes don't reach the server. I now hope wsdl.exe gave me a corrupt file, and I will create a new one. Since I don't really believe in that, more suggestions are welcome. Edit: I tried not using wsdl.exe and create a web reference in visual studio instead. Same problem like before. Edit2: I guess we are making process :-D. Well, not really. After I found the following blog entry while searching the web for "asp.net webservice packet loss" I really thought that's it. But after I finished reading, I realized that there's no solution given at all. I started wireshark and I found these "tcp/ip retransmissions" as well, but still I have no clue what that's all about. By the way, I meanwhile moved to another server (new provider, more ram and cpu, fresh install) and nothing changed.

                modified on Thursday, April 9, 2009 6:41 PM

                1 Reply Last reply
                0
                • Y Yusuf

                  circle-driver wrote:

                  although I set the time to 60 seconds,

                  Where did you set your timeout? Look Here[^] and here[^] ( see the timeouts section )

                  Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

                  C Offline
                  C Offline
                  circle driver
                  wrote on last edited by
                  #8

                  Meanwhile I found the problem and fixed it. Since I'm sitting on an ubuntu computer and use VirtualBox to emulate Windows for .net development the problem where the network settings of the virtual machine. Thanks for your help.

                  Y 1 Reply Last reply
                  0
                  • C circle driver

                    Meanwhile I found the problem and fixed it. Since I'm sitting on an ubuntu computer and use VirtualBox to emulate Windows for .net development the problem where the network settings of the virtual machine. Thanks for your help.

                    Y Offline
                    Y Offline
                    Yusuf
                    wrote on last edited by
                    #9

                    cool :thumbsup::thumbsup:

                    Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

                    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