IIS WCF Diagnosis

Hi Expert,

I am trying to configure trace of WCF in IIS. I configured following code in my Visual Studio and everything works fine.

      <source     name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
          <add    name="traceListener"
                  initializeData= "C:\inetpub\logs\LogFiles\WCF\wcf.svclog" />

Open in new window

However, no log is created after I deploy the codes to Windows 2012 server. I use process monitor to monitor read / write access, but there is no process trying to access this folder. Looks like I didn't enable something.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aaron JabamaniTechnical ArchitectCommented:
Is the service working fine ? able to access any endpoint successfully ?
Bob LearnedCommented:
Does the web service have access to the C:\inetpub\logs\LogFiles\WCF folder?

I have always used a C:\Logs folder, as shown in this MSDN article:

Configuring Tracing
David_zuAuthor Commented:
The WCF service is working fine. I am able to consume service correctly. I use process monitor to check the folder read / write activities. But there is no any activities to the folder. Looks like the config only work in my Visual Studio debug mode.
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

Bob LearnedCommented:
Since the web service runs in partially trusted environment, it is not guaranteed access to a folder.  Is the web service running on IIS?  What identity is used for the application pool?
David_zuAuthor Commented:
The web service is running in IIS. The folder is given "Everyone" rights. But strange thing is IIS doesn't access this folder at all. Because I didn't see any Deny Access from "Process Monitor". I have to review my IIS setup, Roles and Features and so on.
Bob LearnedCommented:
Have you tried switchValue="All", instead of "Information, ActivityTracing"?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David_zuAuthor Commented:
Yes I got it when changed to All. Thanks for the help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.