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.

  <system.diagnostics>
    <sources>
      <source     name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true">
        <listeners>
          <add    name="traceListener"
                  type="System.Diagnostics.XmlWriterTraceListener"
                  initializeData= "C:\inetpub\logs\LogFiles\WCF\wcf.svclog" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>

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.
LVL 1
David_zuAsked:
Who is Participating?
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.

apeterCommented:
Is the service working fine ? able to access any endpoint successfully ?
0
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
https://msdn.microsoft.com/en-us/library/ms733025(v=vs.110).aspx
0
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.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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?
0
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.
0
Bob LearnedCommented:
Have you tried switchValue="All", instead of "Information, ActivityTracing"?
0

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.
0
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
WCF

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.