问题描述
|
我有一个这样的自定义处理程序,
public class Handler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = \"text/plain\";
context.Response.Write(\"Hello World\");
}
public bool IsReusable
{
get
{
return false;
}
}
}
为什么这不起作用?
<system.diagnostics>
<sources>
<source name=\"System.Web\" switchValue=\"All\" propagateActivity=\"true\">
<listeners>
<add name=\"traceListener\" type=\"System.Diagnostics.XmlWriterTraceListener\" initializeData=\"c:\\logs\\Traces_Documents.svclog\" />
</listeners>
</source>
</sources>
</system.diagnostics>
当它在web.config中时,当我调用处理程序时它什么也不做。没有记录等
我以前在WCF服务的System.ServiceModel命名空间上使用了相同的跟踪侦听器,并且可以正常工作。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)