showing non Umbraco View, error HTTP Error 404.0 - Not Found
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:
Below is my controller code:
public class UsersController : Controller
{
//
// GET: /Users/
public ActionResult Index(User model)
{
return View(model);
}
}
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 ?
showing non Umbraco View, error HTTP Error 404.0 - Not Found
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:
Below is my controller code:
public class UsersController : Controller { // // GET: /Users/
My view markup is as below:
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:
Can you please guide how to fix this and navigate to non Umbraco views and controllers ?
Hi Haansi
You probably just need to add the path to the "UmbracoReservedPath" or "UmbracoReservedUrl" key in the web.config file.
In your case you should be able to simply just add the /users/ folder like this
Hope this helps.
/Jan
You also could register a custom route as detailed here
Thanks Jan Skovgaard
In web.config I m doing as below:
My controller 'UsersController' is in MVC application inside Controllers folder and view 'Index' is inside view/Users/Index.
Can you please guide how I should do configuration or if I m doing in wrong way. Even with this configuration message is same. Kindly advice.
Thanks @Jeavon Leopold, after spending days, your suggestion worked for me.
Cheers
is working on a reply...