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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Web Service access in a web page

Web Service access in a web page

Scheduled Pinned Locked Moved ASP.NET
questionhelpdiscussion
3 Posts 2 Posters 1 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.
  • D Offline
    D Offline
    devboycpp
    wrote on last edited by
    #1

    I have a web page that invokes a web service methods to get records displayed on the web page. What happens if two website users vistit the web page at the same time. Two simultaneous requests will be sent to the web service. Should a mechanism be used to enforce exclusive invokation of the web service ? Currently no such mechanism is used in the web page and some times timeout error generated when invoking the web service. I doubt such error is caused by lack of mutal exclusion support when invoking web service. What is the best practice when implementing the web page in question ?

    M 1 Reply Last reply
    0
    • D devboycpp

      I have a web page that invokes a web service methods to get records displayed on the web page. What happens if two website users vistit the web page at the same time. Two simultaneous requests will be sent to the web service. Should a mechanism be used to enforce exclusive invokation of the web service ? Currently no such mechanism is used in the web page and some times timeout error generated when invoking the web service. I doubt such error is caused by lack of mutal exclusion support when invoking web service. What is the best practice when implementing the web page in question ?

      M Offline
      M Offline
      Morgs Morgan
      wrote on last edited by
      #2

      Hi, when two separate webpages perform a request to the server either by calling a webservice or some other request medium, you have no control over what happens once a request is sent to the server. It is two different REQUESTS transmitted in TWO different REQUEST CHANNELS, IIS on your server will manage all of this for you. Your server will respond to these two requests separately and simultaneously. Remember that both your clients are important so you don't want to serve one client and deny the other, the only way to resolve this is to make your server a much faster machine. I can imagine that one day your site will be "live" and 1000+ people will make requests to the webservice at the same time! implementing a mechanism to control which request is served first is really something done by IIS(internet Information Service) and you shouldn't bother, you will kill yourself. Happy coding, Morgs

      D 1 Reply Last reply
      0
      • M Morgs Morgan

        Hi, when two separate webpages perform a request to the server either by calling a webservice or some other request medium, you have no control over what happens once a request is sent to the server. It is two different REQUESTS transmitted in TWO different REQUEST CHANNELS, IIS on your server will manage all of this for you. Your server will respond to these two requests separately and simultaneously. Remember that both your clients are important so you don't want to serve one client and deny the other, the only way to resolve this is to make your server a much faster machine. I can imagine that one day your site will be "live" and 1000+ people will make requests to the webservice at the same time! implementing a mechanism to control which request is served first is really something done by IIS(internet Information Service) and you shouldn't bother, you will kill yourself. Happy coding, Morgs

        D Offline
        D Offline
        devboycpp
        wrote on last edited by
        #3

        Thanks for reply. Maybe I couldn't explain well. The web page in the website invokes a remote web sevice. When two users visit the same web page it means two simultaneous requests are made to the web service both of which are originated from the same Ip address. The matter is they are from the same Ip address. I doubt wether the web service can handle that or a machanism must be used in web page. Or maybe the server can be cofigured to allow such simultanous requests or not ?

        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