当我在帖子中收到xml时,我有2个问题: 1.阿拉伯语等语言在IIS日志中显示为问号(???) 2.符号“ +”显示为空格
其中解析数据并保存到日志文件的问题
HttpRequest Request = HttpContext.Current.Request;
if (Request.InputStream != null)
{
System.IO.StreamReader stream = new System.IO.StreamReader(Request.InputStream, Encoding.UTF8);
string result = stream.ReadToEnd();
result = HttpUtility.UrlDecode(result, Encoding.UTF8);
if (result != null && result.Trim() != string.Empty)
{
HttpContext.Current.Response.AppendToLog("MO-Pelephone=" + result);
context.Response.Write("OK");
return;
}
context.Response.Write("NO DATA RECEIVED");
return;
}