1

We got Mvc4 Web application on server1 calling our Restfull Mvc4 Web Apis on server2 both hosted on IIS 7.5. This architechture works fine. When we put each application on loadbalanced servers the web application works fine however web api project doesnt run on the second server on the loadbalancer. We have just cloned the environments so they both have identical code and configuration but the servernames and mappings.

Is there any extra configuration for hosting MVC4 Web Api applications on loadbalancer?

has anybody actualy got MVC4 Web Api working on loadbalanced environment?

thanks,

4
  • 1
    yes. what is the exact error you encounter? Sep 10, 2012 at 16:20
  • I dont get any response back when it goes to the second server, it just hangs. I will check the load balancer configuration and logs.
    – BumbleBee
    Sep 11, 2012 at 13:15
  • and can you call the api directly? skipping the load balancer Sep 11, 2012 at 14:13
  • I have found the problem! The damn problem was our firewall blocking the web request.
    – BumbleBee
    Dec 11, 2012 at 14:46

2 Answers 2

1

Is there any extra configuration for hosting MVC4 Web Api applications on loadbalancer?

Not necessary if your Web API is stateless and you are not using any ASP.NET session. If you are using an ASP.NET session you might need to use an out-of-process session state instead of the default in-memory.

Has anybody actualy got MVC4 Web Api working on loadbalanced environment?

Yes, I have.

1
  • Well we dont use session in Web Api. How is your load balancer configured, does it serve request in round robin logic
    – BumbleBee
    Sep 11, 2012 at 13:17
0

I have found the problem! The damn problem was our firewall blocking the web request

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.