azure - Is it a bad practice to do WebRequests from ASP.NET MVC app? -


i'm doing web application (asp.net mvc) running/deployed in windows azure.

is bad practice if lot of webrequests application?, is:

actionresult someaction() {       webrequest.create(some url);         .... } 

someaction called lot of times. someaction might create 100 webrequests, or more.

is bad practice?
should using windows service instead? is:

actionresult someaction() {       //save request in db , let windows service poll db       //and webrequests outside mvc application } 

it not bad practice until mandatory project.

btw can wrap remote call using best practice like:

  1. if data in remote url don't change ofter can cache results avoiding multiple web request
  2. use async await methods (if using .net 4.5) web request asyncronous , better performance application

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -