StringBuilder strParam = new StringBuilder(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\r\n");

strParam.Append("------------------------QueryString---------------------\r\n");
NameValueCollection reqQuery = Request.QueryString;
foreach (string key in reqQuery.AllKeys)
{
strParam.Append(key + " = " + reqQuery[key] + "\r\n");
}
strParam.Append("-----------------------------Form-----------------------\r\n");
reqQuery = Request.Form;
foreach (string key in reqQuery.AllKeys)
{
strParam.Append(key + " = " + reqQuery[key] + "\r\n");
}

strParam.Append("-------------------------InputStream--------------------\r\n");

//提交XML文件时读取
System.IO.StreamReader reader = new System.IO.StreamReader(Request.InputStream);
String xmlData = reader.ReadToEnd();
strParam.Append(xmlData + "\r\n");

strParam.Append("=========================================\r\n\r\n");

//允许这个文件的写入权限

System.IO.File.AppendAllText(@"D:\pay_log.txt", strParam.ToString());

在生产环境记录http请求参数的更多相关文章

  1. 明白生产环境中的jvm参数

    明白生产环境中的jvm参数 写代码的时候,程序写完了,发到线上去运行,跑一段时间后,程序变慢了,cpu负载高了--一堆问题出来了,所以了解一下生产环境的机器上的jvm配置是有必要的.比如说: JDK版 ...

  2. tomcat访问(access)日志配置、记录Post请求参数

    tomcat访问(access)日志配置.记录Post请求参数 一.配置与说明 tomcat访问日志格式配置,在config/server.xml里Host标签下加上 <Valve classN ...

  3. 【转】生产环境MySQL Server核心参数的配置

         ⑴ lower_case_table_names              ● 推荐理由                    GNU/Linux 平台,对数据库.表.存储过程等对象名称大小 ...

  4. 【整理】01. localhost_access_log 记录post请求参数

    环境:apache-tomcat-7.0.57 利用Filter过去request请求参数 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...

  5. Servlet、Tomcat访问(access)日志配置、记录Post请求参数

    一.运行环境: Maven:3.5.2(点击下载) ,下载页 Tomcat:8.5.29(点击下载) ,下载页 JDK:jdk1.7.0_80(点击下载) ,下载页 MavenDependency: ...

  6. tomcat访问(access)日志配置、记录Post请求参数(转)

    一.配置与说明 tomcat访问日志格式配置,在config/server.xml里Host标签下加上 <Valve className="org.apache.catalina.va ...

  7. 常用生产环境的PHP安装参数

    ./configure --prefix=/usr/local/php5. --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/b ...

  8. 转 通过 spring 容器内建的 profile 功能实现开发环境、测试环境、生产环境配置自动切换

                                      软件开发的一般流程为工程师开发 -> 测试 -> 上线,因此就涉及到三个不同的环境,开发环境.测试环境以及生产环境,通常 ...

  9. Yarn 生产环境核心参数配置案例

    目录 Yarn 生产环境核心参数配置案例 需求 修改yarn-site.xml配置 分发 重启集群 执行WordCount程序 Yarn 生产环境核心参数配置案例 调整下列参数之前要拍摄Linux快照 ...

随机推荐

  1. Java泛型学习笔记 - (三)泛型方法

    泛型方法其实和泛型类差不多, 就是把泛型定义在方法上, 格式大概就是: public <类型参数> 返回类型 方法名(泛型类型 变量名) {...}泛型方法又分为动态方法和静态方法,:1. ...

  2. what we do and how we behave

    It comes after a report last week revealed the "brutal" treatment of terror suspects by th ...

  3. 学习Excel 十大函数

    云课堂视频教程 笔记总结: URL:http://study.163.com/course/courseLearn.htm?courseId=1009026#/learn/video?lessonId ...

  4. Integer Break(Difficulty: Easy)

    题目: Given a positive integer n, break it into the sum of at least two positive integers and maximize ...

  5. Selenium+Python的环境配置

    因为项目的原因,最近较多的使用了UFT来进行自动化测试工作,半年没有使用Selenium了,于是在自己的电脑上重新配置了基于python3.x的selenium环境,配置过程大致如下: 1. Sele ...

  6. vmware 安装 macos

    http://jingyan.baidu.com/article/ff411625b9011212e48237b4.html

  7. 百度star编程赛-练习1

    ztr loves math http://acm.hdu.edu.cn/showproblem.php?pid=5675 显然:4 ^ n * (a + b) * (a -b) #include & ...

  8. FTP : mput with no confirmation

    When you are transferring multiple files to your destination, 'mput' or 'mget' will be the one comma ...

  9. calender 软文

    http://www.cnblogs.com/cloudgamer/archive/2008/08/23/1274459.html

  10. MySQL知识树-查询语句

    在日常的web应用开发过程中,一般会涉及到数据库方面的操作,其中查询又是占绝大部分的.我们不仅要会写查询,最好能系统的学习下与查询相关的知识点,这篇随笔我们就来一起看看MySQL查询知识相关的树是什么 ...