Webservice fileupload timeout
-
(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
-
(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
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[^]
-
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[^]
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
-
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[^]
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 outWebservice(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
-
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
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!).
-
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 outWebservice(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
maxRequestLength=".........." executionTimeout="....." you give a big number
-
(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
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
-
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[^]
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.
-
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.