v9.7.2018.0421   支持运行时修改DAL连接字符串
大石头 编写于 2018-04-21 14:00:47
X
@model System.Web.Mvc.HandleErrorInfo
@{
    //Layout = "_Ace_Layout.cshtml";
    Layout = "_Layout.cshtml";
    //Layout = NewLife.Cube.Setting.Current.Layout;
    ViewBag.Title = "处理你的请求时出错";

    var error = "没有捕捉到异常信息";
    var context = ViewBag.Context as ExceptionContext;
    if (context != null && context.Exception != null)
    {
        // 由于nginx的配置导致出现奇葩错误
        error = context.Exception.Message;
        if (NewLife.Log.XTrace.Debug)
        {
            error = context.Exception.ToString();
        }
    }
    error = error.Replace("--->", "--->" + Environment.NewLine);
}
<div class="panel panel-default">
    <div class="panel-body">
        <strong>
            <pre class="alert alert-danger" role="alert">@error</pre>
        </strong>
    </div>
    <div class="panel-footer">
        <a href="javascript: history.go(-1);" class="btn btn-info">返回上一页</a>
    </div>
</div>