0

在 asp mvc 5 中,我使用 NuGet 安装了 Elmah.MVC (2.1.2)。

现在在一个 Action 方法中,我提出了一个异常:

public class MyController : Controller
{
    public ActionResult Index()
    {

        throw new Exception("This is test Exception");
        return View();
    }
}

我可以成功查看登录

http://localhost:49353/elmah

但是我该如何处理错误?如何在共享文件夹中显示错误页面?现在我在浏览器中看到异常未处理页面

4

0 回答 0