I'm calling my webservice from a web page and getting a timeout despite setting very high values in my web.config files. This occurs intermittently when the file is usually pretty large but yet the file is still getting uploaded completely (as if the timeout DID NOT occur). Here is a function in my .aspx file which calls my ASMX proxy class:
private void UploadFile(HttpPostedFile postedFile, string fileNameOnly)
{
// create an instance of the proxy class to talk to our service; calling it client:
string strURI = string.Empty;
WSproxyProject.ASMXProxy.FileService client = new WSproxyProject.ASMXProxy.FileService();
try
{
BinaryReader b = new BinaryReader(postedFile.InputStream);
byte[] binData = b.ReadBytes(numBytes);
strURI = client.UploadFile(binData, fileNameOnly, binData.Length);
txtURI.Text = strURI;
LogText("SUCCESS: " + fileNameOnly + " has been uploaded. URI=" + strURI);
}
catch (Exception ex)
{
LogText("UPLOAD ERROR: " + ex.Message.ToString());
}
}
Please note that my web service on localhost calls another web service which actually stores the final data. I have the following executionTimeout setting in of the web.config in all of the following places:
- web.config on my web client project (caller of myWebService)
- web.config on myWebService (caller of vendorWebService)
web.config on vendorWebService (resides on another server in my LAN)
The exception caught by the code block above shows the ex.Source to be System.Web.Services and the ex.Message to be:
The operation has timed out