.NET Webservice processing large file is having its thread aborted
Let give you the details of this rather odd issue.
We have a very large text file to process, it is 780MB and is likily to get bigger. The processing of this file lies in a .NET WebService, a request is sent from a Asp.Net Website client and the processing is started, then when completed returns to the Website.
Before the file was being read via FTP and processed in about a minute. Now the file is being moved to a network share, but when the .Net WebService tries to proceess the file, the thread is being aborted.
When I run the .net webService on my machine the processing is fine, and it completes (altho开发者_如何学Cugh very slow). When the .net WebService is placed on the webserver (hosted by IIS 6.0) it suffers the thread aborted exception.
Any ideas?
If you're running it in debug mode on your own machine, the request timeout is disabled. If non-debug then it is enabled (and defaults to 110 seconds).
See http://msdn.microsoft.com/en-us/library/e1f13641.aspx
That said, having a web service do lengthy processing is generally not a good thing for scalability. Keep web [service] requests short and move long running batch processing to a separate [windows] service to avoid blocking IIS/asp.net resources.
it could be that the webservice has no rights to access the network share. have you tried to move the file to a local drive?
That may very well be an execution timeout. Check out your server configuration, the official doc is here: httpRuntime Element (ASP.NET Settings Schema)
精彩评论