You cannot do RedirectToAction
without a controller, since Action must be on the controller. However, you can redirect to a "simple" html file:
Redirect("~/Shared/ErrorAccessPage.html");
or you can return the view directly from the current controller action without redirecting:
return View("~/Shared/ErrorAccessPage.cshtml");
, "", MVC . :
:
return View("~/Views/Shared/ErrorAccessPage.cshtml");
MVC - "", :
<add key="webpages:Enabled" value="true" />
web.config
.