We are designing a web application using ASP.NET and AJAX and we want to host our WCF Service Layer on a different website and make JavaScript calls to the Service Layer from our client pages. We understand that the browser will not allow AJAX calls to a different port or domain. What is the best way to architect a solution? We are considering using a proxy layer with services hosted on the same domain as the client which has a web reference to the service layer. Is there a better solution?
5 Answers
6
votes
1
votes
0
votes
0
votes
Your load balancer could send all request to /service to your service server.
If you don't have a load balancer, you can have your webserver act as a reverse proxy to your service server. If you are using IIS7, you can do this with the Application Request Routing module.