今逢一Bug,如下:

Invalid non-ASCII or control character in header: 0x6D4B

大意为:报头中有非法字符。故可将其编码后,set入Header,如下:

            Encoding utf8 = Encoding.UTF8;
            //将已经解码的字符再次进行编码.
            string encode = HttpUtility.UrlEncode("陈一狮", utf8).ToUpper();
            Response.Headers.Add("token", encode);

 

相关文章:

  • 2021-12-21
  • 2022-12-23
  • 2021-08-12
  • 2021-11-29
  • 2021-11-28
  • 2021-04-24
  • 2021-06-30
  • 2021-08-24
猜你喜欢
  • 2022-12-23
  • 2021-10-26
  • 2022-02-07
  • 2022-12-23
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案