I have an MVC app that uses default routing: {area}/{controller}/{action}. It sits in back of a reverse proxy (IBM webseal, if it matters) that does authentication for me.
I have a need to have my application sit in back of a different reverse proxy which will cause views to be rendered differently. Here is an example
I have a route:
/RS/Contract/ContractDetails.
That renders a certain view, from behind reverse proxy #1.
Reverse proxy #2 uses a different area, which is called agent. It only has one URL:
/agent/home/agentaccess
The action method AgentAccess sets some flags that cause different layouts to be used, and ultimately redirects to the /RS/Contract/ContractDetails route listed above.
So far it's pretty simple. However, I've been told that when accessing my site through Reverse proxy #2, for security purposes, I can ONLY access the /agent area.
Obviously code duplication is out of the question. I don't want to duplicate the same logic and views in each area. What I'm looking to do, I think, is something akin to the old Server.Execute methods. I'd like to request /agent/home/agentaccess, and execute /RS/Contract/ContractDetails. I could use IController.Execute(), but that doesn't seem very MVC-ish or elegant to me. Is there something better? A way to tape into the routing system to influence what action methods get matched for a requested route would be ideal. Or any other ideas would be welcome.
Thanks!
Jeff