Dim e As RequestEventArgs = args(0)
''记录接收的消息,方便分析,用于调试
Dim str As new StringBuilder
str.AppendLine("Headers:---------------")
For Each key As String In e.Request.Headers.AllKeys
str.AppendLine(key & " = " & e.Request.Headers(key))
Next
str.AppendLine("Headers:---------------")
str.AppendLine("host=" & e.Host)
str.AppendLine("port=" & e.Port)
str.AppendLine("path=" & e.Path)
str.AppendLine("HttpMethod=" & e.Request.HttpMethod)
str.AppendLine("poststring=" & e.PlainText)
str.AppendLine("ip=" & e.Request.RemoteEndPoint().Address.ToString())
str.AppendLine("getValues:---------------")
For Each key As String In e.getValues.Keys
str.AppendLine(key & "=" & e.getValues(key))
Next
str.AppendLine("postValues:---------------")
For Each key As String In e.PostValues.Keys
str.AppendLine(key & "=" & e.PostValues(key))
Next
'----------file
For Each key As String In e.Files.Keys
str.AppendLine(key & " 上传" & e.Files(key).Count & "个文件,分别是:")
For Each fl As String In e.Files(key)
str.AppendLine(fl)
Next
Next
'----------file
Functions.Execute("LogText",str.ToString)
然后在httprequest第一句调用这个函数。