.net - how to add custom trace message inside webmethod in asp.net -


i have added trace.warn message inside page_load event of asp.net website , able view custom tracing messages.

similarly added custom trace message inside webmethod

[webmethod] public static object save(string data) {   httpcontext.current.trace.warn("start save method :"); } 

but not giving trace information. reason? or how can implement tracing inside method , on section of trace information can see trace message?

is possible use tracing @ asp.net page level <%@ page language="c#" trace="true" %> ?

in case have enable tracing globally in web.config file:

<trace enabled="true" pageoutput="false" requestlimit="40" localonly="false"/> 

then can access information via page http://localhost:<portnumber>/trace.axd in section trace information each request.

i tested. working warn/write on aspx pages , webmethods.


Comments