Beispiel #1
0
 public void ProcessRequest(HttpListenerContext RequestContext)
 {
     try
     {
         var req  = new XmlRpcListenerRequest(RequestContext.Request);
         var resp = new XmlRpcListenerResponse(RequestContext.Response);
         HandleHttpRequest(req, resp);
     }
     catch (Exception ex)
     {
         RequestContext.Response.StatusCode        = (int)HttpStatusCode.InternalServerError;
         RequestContext.Response.StatusDescription = ex.Message;
     }
 }
 public override void ProcessRequest(HttpListenerContext RequestContext)
 {
     // base.ProcessRequest(RequestContext);
     try
     {
         IHttpRequest  req  = new XmlRpcListenerRequest(RequestContext.Request);
         IHttpResponse resp = new XmlRpcListenerResponse(RequestContext.Response);
         HandleHttpRequestMy(req, resp);
     }
     catch (Exception ex)
     {
         // "Internal server error"
         RequestContext.Response.StatusCode        = 500;
         RequestContext.Response.StatusDescription = ex.Message;
     }
     finally
     {
         RequestContext.Response.OutputStream.Close();
     }
 }