views:

362

answers:

3

I configured message tracing for my WCF webservice like this:

  <!--TRACING  -->
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel" switchValue="Verbose, ActivityTracing" propagateActivity="true">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
      <source name="System.ServiceModel.MessageLogging" switchValue="Verbose">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="log_messages_verbose.log" />
    </sharedListeners>
    <trace autoflush="true" />
  </system.diagnostics>

This works fine on my development machine, it logs all messages and traces to an xml file. Now when deploying the webservice as (sub) Webapplication inside a Sharepoint Webapplication, the service works fine but the trace file stays empty.

I checked the permission on the file, tried absolute file paths, but it still does not work.

Because the webservice is deployed as sub webapplication, it inherits the web.config settings from sharepoint. Could this be an issue? Does sharepoint somehow disable the normal tracing?

Any suggestions are welcome..

A: 

Do you have the possibility of copying this into sharepoint's web.config?

Also check in your event log for error messages.

Edit

Not sure what the default is for enabled, you could try setting it to true

<trace enabled="true" />
Shiraz Bhaiji
I tried that, no difference :(Also there are no entries in the event log unfortunately.
driAn
A: 

Assuming your web service is deployed to its own directory (so that it does not interfere with SharePoint), have you tried adding a web.config with the above trace config to that directory?

Otherwise as Shiraz suggests try adding the trace code to SharePoint's web.config.

Alex Angas
The webservice has its own directory (web appliaction with separate app pool) and its own web.config
driAn
A: 

Arrrgh! I've tried everything. This is driving me crazy.

super_b