Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF Service Method Name in IIS Log

Tags:

logging

iis

wcf

Can the IIS logs be configured to output the name of the method called for a WCF service?

Right now the logs show only the name of the svc file.

Current log:

/myservice.svc

I would like it to show:

/myservice.svc/mymethod

like image 857
New WCF User Avatar asked Sep 21 '11 22:09

New WCF User


People also ask

How do I check IIS service logs?

IIS log files are stored by default in the %SystemDrive%\inetpub\logs\LogFiles folder of your IIS server. The folder is configured in the Directory property on the Logging page for either the server or an individual site.

What are the fields in IIS logs?

IIS Log File Format IIS format records more information than NCSA Common format. The IIS format includes basic items, such as the user's IP address, user name, request date and time, service status code, and number of bytes received.

What is stored in IIS logs?

IIS logs are meant to record data from Internet Information Services, web pages, and apps. While IIS itself contributes to the scalability and flexibility of web resources, the log files contain specific statistics about the websites, user data, site visits, IPs, and queries.

How do I enable WCF Logging?

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.


1 Answers

Unfortunately, there is no way to have the IIS standard logging log the method name called on a service. It only registers the page serviced.

You can however enable WCF logging to produce an svclog file that does give complete insight in method invocations and WCF service operations. For details, look at: http://msdn.microsoft.com/en-us/library/ms730064.aspx.

Might that be acceptable?

like image 117
kroonwijk Avatar answered Sep 25 '22 09:09

kroonwijk