c# visual studio重定向过多

升级2019,2020

  1. 没有错误信息,全局搜索301的页面字符串。全文档搜索
    找到了
   void Application_Error(object sender, EventArgs e)
        { 
            Exception objErr = base.Server.GetLastError().GetBaseException();
            string error = objErr.Message ?? "";
            base.Server.ClearError();//??
            base.Application["error"] = error;
            //base.Response.Redirect("~/ .aspx");
  1. debug
    得到:
    Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either ‘localhost’ or ‘127.0.0.1’ as the server name.
  2. 参考 可我的服务器不在本地。

以后了解一下:
ASP.NET State Service 这个服务
在这里插入图片描述
webconfig中:stateConnectionString

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值