Where does in web.config go for MVC applications?

前端 未结 2 1859
耶瑟儿~
耶瑟儿~ 2021-01-01 13:11

I\'m attempting to implement custom error handling in my MVC 4 app. I\'m not certain where in my web.config the is supposed to go, and the

2条回答
  •  梦谈多话
    2021-01-01 13:48

    In web.config file under root directory

    
    
    
    

    Create a shared folder under view folder, and create a view under shared folder for showing Error message

    in action use that [HandleError] like

    [HandleError]
        public ActionResult Errors()
        {
            throw new Exception();
        }
    

提交回复
热议问题