Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF logging not working, trying to get ANY information on why services don't work

Tags:

trace

wcf

I have deployed a few WCF services to a server via a web setup project they are being hosted in an IIS Application, which appears to be running fine.

However when i try to navigate to the wsdl, nothing is found.

I am trying to set up diagnostics logging, to get some information.

I have followed the advice from here: wcf trying to set up tracing to debug, not writing to log file

Also, I have tried what is in the referenced MSDN documentation: under "Recommended Settings for Deployment or Debugging" .. my web.config has that identical configuration. But no log file is being created.

Nothing useful in the event viewer.

Any ideas?

like image 952
j g Avatar asked Jun 29 '10 18:06

j g


People also ask

How to enable WCF log?

Windows Communication Foundation (WCF) does not log messages by default. To activate message logging, you must add a trace listener to the System. ServiceModel. MessageLogging trace source and set attributes for the <messagelogging> element in the configuration file.

How do I check WCF logs?

Viewing Event Logs. Event logging is enabled automatically by default, and there is no mechanism to disable it. Events logged by WCF can be viewed using the Event Viewer. To launch this tool, click Start, click Control Panel, double-click Administrative Tools, and then double-click Event Viewer.

How do I enable WCF tracing on client?

ServiceModel. MessageLogging trace source records all messages that flow through the system. Tracing is not enabled by default. To activate tracing, you must create a trace listener and set a trace level other than "Off" for the selected trace source in configuration; otherwise, WCF does not generate any traces.

How do I turn off tracing in WCF?

If you want to disable the trace source, you should use the logMessagesAtServiceLevel , logMalformedMessages , and logMessagesAtTransportLevel attributes of the messageLogging element instead. You should set all these attributes to false.


1 Answers

Could be a permissions issue; IIRC those don't always turn up in the event log. Ensure the user IIS runs under has write permissions to the log file path.

like image 65
Randolpho Avatar answered Dec 10 '22 13:12

Randolpho