From 71d7951b8c201f93e92929806b6e782ad2e79f40 Mon Sep 17 00:00:00 2001 From: Peterinor Date: Sun, 25 Aug 2013 13:05:27 +0800 Subject: [PATCH] Signed-off-by: Peterinor --- 9227/avt7/Controllers/avt7Controller.cs | 7 ++++--- 9227/avt7/weixinLog/msg_2013_08_25_01_04_13.txt | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 9227/avt7/weixinLog/msg_2013_08_25_01_04_13.txt diff --git a/9227/avt7/Controllers/avt7Controller.cs b/9227/avt7/Controllers/avt7Controller.cs index 9705374..a1e7fc3 100644 --- a/9227/avt7/Controllers/avt7Controller.cs +++ b/9227/avt7/Controllers/avt7Controller.cs @@ -24,7 +24,7 @@ public class avt7Controller : Controller [HttpGet] public string Index(string signature, string timestamp, string nonce, string echostr) { - //Utities.Log("D:/weixinLog/sig_" + DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss") + ".txt", echostr); + //Utities.Log(appPath + "weixinLog/sig_" + DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss") + ".txt", echostr); return echostr; } @@ -33,13 +33,14 @@ public string Index(string signature, string timestamp, string nonce, string ech [ValidateInput(false)] public string Index() { + var appPath = Request.PhysicalApplicationPath; try { Stream input = Request.InputStream; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(Request.InputStream); - Utities.Log("D:/weixinLog/msg_" + DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss") + ".txt", xmlDoc.InnerXml); + Utities.Log(appPath + "weixinLog/msg_" + DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss") + ".txt", xmlDoc.InnerXml); TMessage MSG = new TMessage(xmlDoc); @@ -57,7 +58,7 @@ public string Index() } catch (Exception e) { - Utities.Log("D:/weixinLog/msg_Error.txt", e.Message); + Utities.Log(appPath + "weixinLog/msg_Error.txt", e.Message); } return ""; } diff --git a/9227/avt7/weixinLog/msg_2013_08_25_01_04_13.txt b/9227/avt7/weixinLog/msg_2013_08_25_01_04_13.txt new file mode 100644 index 0000000..6c75e57 --- /dev/null +++ b/9227/avt7/weixinLog/msg_2013_08_25_01_04_13.txt @@ -0,0 +1 @@ +1365749824<![CDATA[公众平台官网链接]]>5865850828597755958