需求:監控每個 WebService 呼叫端的 IP、呼叫類別與方法。透過分析 HttpContext.Current.Request 實現。
HttpContext.Current.Request.UserHostAddressHttpContext.Current.Request.InputStream (SOAP 訊息)<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope ...>
<soap:Body>
<MyTestMethod xmlns="https://tempuri.org/">
<msg>abcd</msg>
</MyTestMethod>
</soap:Body>
</soap:Envelope>
可解析出方法名 MyTestMethod、參數 msg=abcd。