My C# MVC project is hosted on abc.com. When making an Ajax call for a resource on Controller:Home and Method:ClientInfo, the URL looks like this:
url: '/Home/ClientInfo'
For testing purposes, I deployed the same project on xyz.com/web. The home page in this case is xyz.com/web. However, when Ajax calls are made for the resource Controller:Home and Method:ClientInfo with the same URL '/Home/ClientInfo', it returns a '404 Not Found' error because the URL should be something like this:
url: '/web/Home/ClientInfo'
One solution would be to manually edit all Ajax URLs throughout the project, but that doesn't seem like the right approach. I have a common layout - can I write JavaScript code there to route all URLs under the directory '/web', or is there another way?
*Note: I do not have control over the web.config of xyz.com to handle the calls and write rules.
Please provide suggestions.