Developer Guide
Other Responses

    Other responses may be used to help with certain conditions within the system. 

     

    Unauthorized Access

    If the user is not authorized to access a certain page, you can set this reponse to appear if they try to access it. 

    public ActionResponse MyAction()
    {
        //If user is not authenticated
        if (SystemInfo.IsGuestUser)
            return UnauthorizedAccessResponse();
        else
            return View();
    }
    

     

    Showing Error Messages

    If you wish to redirect the user to an Error page and prevent the action's original view from showing, you can use the notation below:

    public ActionResponse MyAction()
    {
         return RedirectToError("This method is not yet implemeted");
    }
    

     

    User-friendly 404 Error Message

    public ActionResponse MyAction()
    {
        //this action is no longer supported.
        return PageNotFound();
    }