I've been looking for an answer to this question without any luck so maybe someone here has a bit more insight:
1) I have an application that makes http calls. (On box 1)
2) I have services that access the database and so on. (On box 2)
3) I'm working on services that will live in another location and its main purpose to catch all service requests from box 1 and remake the service call from box 2, then return the result to box 1. (A middle man which lives on box 3).
Box 1 makes http calls to box 3 which makes calls to box 2, box 3 then returns the result to box 1.
I have the code setup to intercept the requests using ExecuteAsync
. The issue I'm having is, within the appservice (box 3)- I'm unable to intercept the calls without stubbing out the request functions / routes that exist on box 2 (404 is returned if I don't as the route doesn't exist on box 3 yet).
My ultimate question is: is it possible to allow all requests to pass through the webservice and hit the ExecuteAsync
function without the routes / functions ever being defined?
I've tried multiple variations to the RegisterRoutes
function in the RouteConfig and nothing appears to work.
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "*",
defaults: new { controller = "BaseController", action = "Index", id = UrlParameter.Optional }
);
}