none
IHttpHandler and witing to IIS Logs RRS feed

  • General discussion

  • I am trying to do :

    <%@ WebHandler Language="C#" Class="test1" %>
    
    using System;
    using System.Web;
    using System.Xml;
    using System.Net;
    using System.Xml.Linq;
    
    public class test1 : IHttpHandler
    {
           
        public void ProcessRequest(HttpContext context)
        {
    		if (context.Request.InputStream != null)
            {
                System.IO.StreamReader stream = new System.IO.StreamReader(context.Request.InputStream);
                string result = stream.ReadToEnd();
             context.response.AppendToLog(result);

    the result is not written to the log.

    should i change something?

    • Moved by CoolDadTx Thursday, May 7, 2020 2:22 PM ASP.NET related
    Thursday, May 7, 2020 10:20 AM

All replies

  • This forum is for C#-specific questions only. Please post questions related to development of ASP.NET applications in the ASP.NET forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Thursday, May 7, 2020 2:22 PM