Http 状态码302 后跳转重定向值login界面

在global.asax 中

{
//登录是否过期
//if (!ManageProvider.Provider.IsOverdue())
//{
// HttpContext.Current.Response.Redirect("~/Login");
// return;
//}
Dictionary<string, string> modulesError = new Dictionary<string, string>();
modulesError.Add("发生时间", DateTime.Now.ToString());
modulesError.Add("错误描述", ex.Message.Replace("\r\n", ""));
modulesError.Add("错误对象", ex.Source);
modulesError.Add("错误页面", "" + HttpContext.Current.Request.Url + "");
modulesError.Add("浏览器IE", HttpContext.Current.Request.UserAgent);
modulesError.Add("服务器IP", NetHelper.GetIPAddress());
Application["error"] = modulesError;
log.Debug("错误内容:"+ex.Message+" 堆栈"+ex.StackTrace+ "服务器IP:"+ NetHelper.GetIPAddress()+ "浏览器IE:" + HttpContext.Current.Request.UserAgent+"错误页面:"+ HttpContext.Current.Request.Url);
//HttpContext.Current.Response.Redirect("~/Error/Index");
}

1.先注释掉 重定向内容

2. 在webconfig中 

<system.web>下添加
<customErrors mode="Off" />(排查完真正的问题 完记得删除)

 

 

之后就可以看出 到底报了什么异常了

posted @ 2022-08-02 15:00  CoderEJ  阅读(337)  评论(0)    收藏  举报