LocalHost WebServices from ASPX pages

Erik Porter's been in a quandry, though he seems to have come to a decision about whether or not to call a web service on the local machine, or the business object directly.

Interestingly enough, I was just reading Matt Powell's MSDN article that discusses this very subject: 

Performance Considerations for Making Web Service Calls from ASPX Pages. 

To quote the pertinent paragraph:

 It should be noted that thread pool limitations are exacerbated if your ASP.NET application is making Web service calls to the local machine. For instance, the test application that I created for this column calls a Web service on the same machine as the ASPX pages. Therefore, for blocking calls, a thread is being used for the ASPX page as well as for the ASMX Web service request. This effectively doubles the number of simultaneous requests our Web server is handling. In the scenario where we are making two simultaneous Web service requests (using asynchronous Web service calls), we end up tripling the number of simultaneous requests. To avoid these types of problems when calling back to the local machine, you should consider architecting your application to simply execute the code in the Web method directly from your ASPX code.

1 Comment

  • Awesome, thanks for the link! :D



    And thanks for spelling my name correctly! It's sad when I see "programmers" of all people misspell my name when it's right in front of their face all over the place...just let's me know what "kind" of programmer they are and now I know something about you...thanks again ;)

Comments have been disabled for this content.