今逢一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);

 

posted on 2018-01-23 13:37  chester·chen  阅读(1670)  评论(0编辑  收藏  举报