How to set timeout for WebService?

Discussion in 'ASP .Net' started by Simon, Nov 5, 2008.

  1. Simon

    Simon Guest

    I would like to know how to set the timeout for
    System.Web.Services.WebService class (from which my web service is derived)?
    According to documentation there should be Timeout property, but I can not
    find this property.

    Best regard

    Simon
     
    Simon, Nov 5, 2008
    #1
    1. Advertising

  2. <httpRuntime executionTimeout="numberof seconds"/>

    <system.web>..
    <compilation debug="false"/>
    <httpRuntime executionTimeout="1200"/>
    </system.web>



    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espanol : http://asp.net.do/foros/
    ======================================
    "Simon" <> wrote in message news:...
    >I would like to know how to set the timeout for System.Web.Services.WebService class (from which my web service is
    >derived)? According to documentation there should be Timeout property, but I can not find this property.
    >
    > Best regard
    >
    > Simon
     
    Juan T. Llibre, Nov 5, 2008
    #2
    1. Advertising

  3. Simon

    George Guest

    Which timeout are you looking for?
    There are 2 actually.

    One on a server which makes sure that your WebService method is not running
    forever and will be aborted if exceeds some time.
    I do not see Timeout property in WebService class.
    http://msdn.microsoft.com/en-us/library/system.web.services.webservice_members.aspx
    You can set/change this time out in web.config See: <httpRuntime
    executionTimeout="..."/>


    Another one is on a client which makes sure that your client is not waiting
    forever for WebService to reply...
    The class is actually called SoapHttpClientProtocol and it has a Timeout
    property.

    George.




    "Simon" <> wrote in message
    news:...
    >I would like to know how to set the timeout for
    >System.Web.Services.WebService class (from which my web service is
    >derived)? According to documentation there should be Timeout property, but
    >I can not find this property.
    >
    > Best regard
    >
    > Simon
     
    George, Nov 5, 2008
    #3
  4. Simon

    Simon Guest

    I am referring to the second one. How do you set that?

    Simon

    "George" <> wrote in message
    news:...
    > Which timeout are you looking for?
    > There are 2 actually.
    >
    > One on a server which makes sure that your WebService method is not
    > running forever and will be aborted if exceeds some time.
    > I do not see Timeout property in WebService class.
    > http://msdn.microsoft.com/en-us/library/system.web.services.webservice_members.aspx
    > You can set/change this time out in web.config See: <httpRuntime
    > executionTimeout="..."/>
    >
    >
    > Another one is on a client which makes sure that your client is not
    > waiting forever for WebService to reply...
    > The class is actually called SoapHttpClientProtocol and it has a Timeout
    > property.
    >
    > George.
    >
    >
    >
    >
    > "Simon" <> wrote in message
    > news:...
    >>I would like to know how to set the timeout for
    >>System.Web.Services.WebService class (from which my web service is
    >>derived)? According to documentation there should be Timeout property, but
    >>I can not find this property.
    >>
    >> Best regard
    >>
    >> Simon

    >
     
    Simon, Nov 5, 2008
    #4
  5. Simon

    George Guest

    Obviously it must be set on a clients.
    Right after you have instantiated your service but before the actual call.

    Something like this
    Service.StoreSupport sw = new Service.StoreSupport();
    sw.Timeout = 1000; //1 second
    Service.clsGetCategoriesGroupsReply rp =
    sw.GetCategoryGroups(_objBs._sAccessTocken);


    George

    "Simon" <> wrote in message
    news:...
    >I am referring to the second one. How do you set that?
    >
    > Simon
    >
    > "George" <> wrote in message
    > news:...
    >> Which timeout are you looking for?
    >> There are 2 actually.
    >>
    >> One on a server which makes sure that your WebService method is not
    >> running forever and will be aborted if exceeds some time.
    >> I do not see Timeout property in WebService class.
    >> http://msdn.microsoft.com/en-us/library/system.web.services.webservice_members.aspx
    >> You can set/change this time out in web.config See: <httpRuntime
    >> executionTimeout="..."/>
    >>
    >>
    >> Another one is on a client which makes sure that your client is not
    >> waiting forever for WebService to reply...
    >> The class is actually called SoapHttpClientProtocol and it has a Timeout
    >> property.
    >>
    >> George.
    >>
    >>
    >>
    >>
    >> "Simon" <> wrote in message
    >> news:...
    >>>I would like to know how to set the timeout for
    >>>System.Web.Services.WebService class (from which my web service is
    >>>derived)? According to documentation there should be Timeout property,
    >>>but I can not find this property.
    >>>
    >>> Best regard
    >>>
    >>> Simon

    >>

    >
     
    George, Nov 6, 2008
    #5
    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. Bob Johnson
    Replies:
    0
    Views:
    3,817
    Bob Johnson
    Aug 7, 2003
  2. Do
    Replies:
    2
    Views:
    6,431
  3. Lars-Erik Aabech
    Replies:
    3
    Views:
    419
    [MSFT]
    Apr 29, 2005
  4. tony
    Replies:
    1
    Views:
    268
    Manish Bafna
    Feb 28, 2007
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,333
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page