I have a general view called NotAuthorized in the "Views / Shared" folder. I want to redirect users to this view when they are not allowed to see the page.
This view was originally in the Account folder. But I moved it to the General folder, because I no longer use the account. I deleted the Account folder.
I used the following code to redirect:
public ActionResult NotAuthorised()
{
return RedirectToAction("NotAuthorised", "Account");
}
Now that I have deleted the Account folder, I am trying to use
public ActionResult NotAuthorised()
{
return RedirectToAction("NotAuthorised", "Shared");
}
I am completely wrong in specifying the folder name shared on the last line.
Can someone tell me what I am doing wrong?
thank
source
share