WebMethod Times Out

L

landers

Hi All,

Trying to pass a 5Mb file in byte array parameter on a method. It seems to
time out. I have set the ExecutionTimeOut in the web.config to 300.

<httpRuntime executionTimeout="300" />

The following exception is raised:

System.Net.WebException: The operation has time-out.

I found a post that showed me how to set the timeout on the client
application:

Dim myWebService As XYZ = New XYZ

myWebService.TimeOut = 3000000

By adding this, I got further however the following exception now occurs:

System.Xml.XmlException: '

What kind of error message is this. FYI, the quote is deliberate in the
above message. Has anyone come across this odd behaviour?

Landers
 
M

Manish Bafna

Hi,
In addition to executiontimeout you need to set maxRequestLength also.The
default is 4096 KB(4mb).For example, ten minutes and 400 mb it should look
like this:
<httpRuntime executionTimeout="600" maxRequestLength="409600"/>
Hope this helps.
 
L

landers

Thanks for your response.

I already tried that. It was set to 10MB. I've resorted to sending the
bytes via FTP opposed to HTTP. As it turns out, it is quicker anyway.

Landers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top