0

我在 Web.config 中使用 MVC3 和这个配置

<customErrors mode="On">
  <error statusCode="404" redirect="~/Error/NotFound" />
</customErrors>

因为我只是在 UI 中显示 404 NotFound ,所以我想显示

Sorry, an error occurred while processing your request

用我的布局留言!不在空白页中,它的配置在哪里??

4

1 回答 1

0

我很确定您必须添加它(控制器,视图)。

您不能配置不存在的东西。如果你摆弄“空白页面”,我怀疑你会看到一个 404 http 代码,这意味着请求没有找到未找到的页面。

于 2013-05-20T10:48:27.927 回答