在調試中發現錯誤如下:
Response.Redirect引起的“無法在發送HTTP標頭之后進行重定向” 跳轉失敗
解決方案如下:
使用js方法來跳轉地址
1 const string url="<script>window.location.href='/login/index'</script>;
2 System.Web.HttpContext.Current.Response.Write(url);
3 System.Web.HttpContext.Current.Response.End();