Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Best Practice"/Favourite Pattern for Calling Web Services (ASP.NET)

Problem:

  • We have a web app that calls some web services asynchronously (from the page).
  • Normally this is fine, but some are failing under load test (due to timeouts).

What are (if there are any) any suggested "best practices" for calling web services asynchronously in a web application?

  • Are there any patterns that may be of use?
  • Should direct calling of services be avoided? (perhaps resorting to some other method such as AJAX)?

To Illustrate - Direct Calling:

WSNameSpace.WSName svc = new WSNameSpace.WSName();
svc.EventName += new WSNameSpace.EventNameEventHandler(CallbackDelegate);
svc.ServiceMethodAsync(param1, param2);
  • Should I focus more on improving the exception handling rather than calling the services?

Many thanks.

Rob

Update

I have been Googleing and have found this article on creating "service agents", while it relates to WinForms, I will definitely have a sit down and read of this later to see how it affects my thoughts on this :)

like image 305
Rob Cooper Avatar asked Nov 12 '08 08:11

Rob Cooper


1 Answers

Use async call to webservice with async pages. Something like this http://gofrom.us/6LC

like image 134
Zote Avatar answered Oct 24 '22 11:10

Zote