Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Calculating Web Service Response Time

Calculating Web Service Response Time

Scheduled Pinned Locked Moved ASP.NET
help
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prabhakar dwivedi
    wrote on last edited by
    #1

    Hi All, I want to calculate web service response time , if the response time is more than 30 second i want to stop all processing and show time out message. Please help me out Thanks Prabhakar Dwivedi

    prabhakar dwivedi

    A 1 Reply Last reply
    0
    • P prabhakar dwivedi

      Hi All, I want to calculate web service response time , if the response time is more than 30 second i want to stop all processing and show time out message. Please help me out Thanks Prabhakar Dwivedi

      prabhakar dwivedi

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      Just call the web service asynchronously. After call is made start calculating the time. Check with the elapsed time with the timeout. If its greater place the error and dispose the request object. :) simple. :)

      Abhishek Sur


      My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

      **Don't forget to click "Good Answer" if you like to.

      P 1 Reply Last reply
      0
      • A Abhishek Sur

        Just call the web service asynchronously. After call is made start calculating the time. Check with the elapsed time with the timeout. If its greater place the error and dispose the request object. :) simple. :)

        Abhishek Sur


        My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

        **Don't forget to click "Good Answer" if you like to.

        P Offline
        P Offline
        prabhakar dwivedi
        wrote on last edited by
        #3

        No i have to call it synchornsly

        prabhakar dwivedi

        A 1 Reply Last reply
        0
        • P prabhakar dwivedi

          No i have to call it synchornsly

          prabhakar dwivedi

          A Offline
          A Offline
          Abhishek Sur
          wrote on last edited by
          #4

          Synchronous means the current thread will be blocked until response is received from the server. If you are holding the current thread, you cant do the calculation. But I think there is one wayout. You can load the page in an IFrame, and check if Iframe.document is loaded. This will give you an option to calculate the Time. Hope you got the idea. :)

          Abhishek Sur


          My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

          **Don't forget to click "Good Answer" if you like to.

          P 1 Reply Last reply
          0
          • A Abhishek Sur

            Synchronous means the current thread will be blocked until response is received from the server. If you are holding the current thread, you cant do the calculation. But I think there is one wayout. You can load the page in an IFrame, and check if Iframe.document is loaded. This will give you an option to calculate the Time. Hope you got the idea. :)

            Abhishek Sur


            My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

            **Don't forget to click "Good Answer" if you like to.

            P Offline
            P Offline
            prabhakar dwivedi
            wrote on last edited by
            #5

            Thanks Abhi I am thinking the same your second one , but the problem is i ahve only on text area where i have to show the response. wil try.... Thanks :)

            prabhakar dwivedi

            A 1 Reply Last reply
            0
            • P prabhakar dwivedi

              Thanks Abhi I am thinking the same your second one , but the problem is i ahve only on text area where i have to show the response. wil try.... Thanks :)

              prabhakar dwivedi

              A Offline
              A Offline
              Abhishek Sur
              wrote on last edited by
              #6

              Yes why not. Just create an IFrame dynamically using Javascript. var ifr = document.createElement('IFrame'); Load the document and show the response time. Feel free to tell me if you cant solve this issue. :)

              Abhishek Sur


              My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

              **Don't forget to click "Good Answer" if you like to.

              P 1 Reply Last reply
              0
              • A Abhishek Sur

                Yes why not. Just create an IFrame dynamically using Javascript. var ifr = document.createElement('IFrame'); Load the document and show the response time. Feel free to tell me if you cant solve this issue. :)

                Abhishek Sur


                My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

                **Don't forget to click "Good Answer" if you like to.

                P Offline
                P Offline
                prabhakar dwivedi
                wrote on last edited by
                #7

                Thanks again Abhi but as per my requrment , i can not use java script X| I am thinking about Timer control, have you any idea how to use timer control in this type of situation Thnaks a lot

                prabhakar dwivedi

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups