Hi,
I have a standard SOAP webservice with a WebMethod which accepts a byte array and then performs a
[WebMethod(true)]
WriteFile(byte[] Data, string FilePath)
{
File.WriteAllBytes(FilePath, Data);
}
If this process is passed a large file, e.g. 2 meg it is bombing out with the following error message:
Insufficient system resources exist to complete the requested service
Looking at the stack trace i'm getting:
- System.IO.File.WriteAllBytes
- System.IO.FileStream.Write
- System.IO.FileStream.WriteCore
- System.IO.__Error.WinIOError
- System.IO.IOException: Insufficient system resources exist to complete therequested service
I've tried all the obvious things such as setting the maxrequestlength and executing timeout to more realistic settings:
<httpRuntime maxRequestLength="409600" executionTimeout="900"/>
It still seems to fail over with the above. If you send a smaller file it saves to disk fine.. So it's either file size or time that's the issue.
Does anyone know of anything else i can do to sort this out?
Thanks
Dave