How to pass error message to error view in MVC 5?

后端 未结 3 707
太阳男子
太阳男子 2021-02-06 13:05

I am working on exception handling and have written below code for the same.

Web.Config

         


        
3条回答
  •  深忆病人
    2021-02-06 13:22

    You can try sending like this

    filterContext.HttpContext.Items["Exception"] = Exception.Message;
    

提交回复
热议问题