public class sdp : IHttpHandler { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); string returnMsg; public void ProcessRequest(HttpContext context) { var ip = context.Request.Headers["Host"]; // var ip = context.Request["HTTP_X_FORWARDED_FOR"] ?? context.Request.UserHostAddress; log.DebugFormat( "Received request from IP: {0}, Msisdn: {1}, Message: {2}", ip, context.Request["msisdn"], context.Request["msg"] ); var status = Processor.Instance.Process(context.Request.Params["msisdn"], context.Request.Params["msg"]); log.Info(status.Description); context.Response.ContentType = "text/plain"; returnMsg = string.Format("3{0}", status.Description); log.Info(returnMsg); context.Response.Write(returnMsg); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)