Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
static void Main(string[] args)
{


WebServiceTarget target = new WebServiceTarget();
target.Url = new System.Uri("http://localhost:52427/api/audit");
target.Protocol = WebServiceProtocol.HttpPost;

target.Parameters.Add(new MethodCallParameter("n1", "haiall"));
NLog.Config.SimpleConfigurator.ConfigureForTargetLogging(target, LogLevel.Debug);

Logger logger = LogManager.GetLogger("Example");
logger.Trace("log message 1");
logger.Debug("log message 2");
logger.Info("log message 3");
logger.Warn("log message 4");
logger.Error("log message 5");
logger.Fatal("log message 6");

}

where target.url is my hosted webapi url ,the code is executing but the call to
webapi is not raised
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900