In MVC 4 application I have Nuget Umbraco CMS 7.
I need to keep a non-Umbraco/ custom controller with view. I have created an MVC controller named Users
which has an action named Index
. I have updated umbracoReservedUrls
in web.config as below:
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd,~/Users/Index" />
Below is my controller code:
public class UsersController : Controller
{
//
// GET: /Users/
public ActionResult Index(User model)
{
return View(model);
}
}
My view markup is as below:
@model Common.Model.User
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
Issue:
On running if I navigate to http://localhost:56512/users/index
, control do not come to controller and in browser I got 404 error as detailed below:
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Can you please guide how to fix this and navigate to non Umbraco views and controllers ?