background image

近日在使用

MVC2 的异常处理的时候,遇到一些问题

1. 我们的 Error.aspx 是没有使用 MasterPage

2.通过如下代码测试

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcApplication1.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            throw new ApplicationException();

        }

        public ActionResult About()
        {
            return View();