WebMethod Times Out

Discussion in 'ASP .Net Web Services' started by landers, Apr 5, 2007.

  1. landers

    landers Guest

    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
     
    landers, Apr 5, 2007
    #1
    1. Advertising

  2. landers

    Manish Bafna Guest

    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.
    --
    If my answer helped you,then please do press Yes below.
    Thanks and Regards.
    Manish Bafna.
    MCP and MCTS.



    "landers" wrote:

    > 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
    >
    >
    >
    >
    >
     
    Manish Bafna, Apr 9, 2007
    #2
    1. Advertising

  3. landers

    landers Guest

    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

    "Manish Bafna" <> wrote in message
    news:...
    > 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.
    > --
    > If my answer helped you,then please do press Yes below.
    > Thanks and Regards.
    > Manish Bafna.
    > MCP and MCTS.
    >
    >
    >
    > "landers" wrote:
    >
    >> 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
    >>
    >>
    >>
    >>
    >>
     
    landers, Apr 19, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?bWF2cmlja18xMDE=?=

    SetAuthCookie works some times and fails some times?

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 23, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    569
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 23, 2006
  2. =?Utf-8?B?bWF2cmlja18xMDE=?=

    Forms Authentication Fails some times and not some times???

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    518
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 28, 2006
  3. djskrill
    Replies:
    9
    Views:
    723
    djskrill
    Oct 1, 2003
  4. Peng Yu
    Replies:
    17
    Views:
    734
    Peng Yu
    Sep 14, 2008
  5. Jack Steven
    Replies:
    2
    Views:
    476
    Chris Rebert
    Mar 9, 2009
Loading...

Share This Page