Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3338538
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:23:17+00:00 2026-05-18T00:23:17+00:00

When using System.Diagnostics TraceSource for logging/tracing, is there a difference between using TraceSource.TraceTransfer and

  • 0

When using System.Diagnostics TraceSource for logging/tracing, is there a difference between using TraceSource.TraceTransfer and TraceSource.TraceEvent(TraceEventType.Transfer, … ?

In our environment, we will be developing a number of services that will communicate via WCF. We are also evaluating what platform we should use for logging/tracing. We are leaning towards using System.Diagnostics, at least in part because of the ability to correlate logs between services using the CorrelationManager, ActivityID, TraceTransfer etc.

I can see in the documentation for TraceSource that it has a TraceTransfer method as well as a TraceEvent that can take TraceEventType.Transfer as an event type. When would you use one vs the other? I have seen examples like here that show how to use Start/Stop and how to manage the ActivityID and CorrelationManager, but I have rarely seen anyone use TraceSource.TraceEvent(TraceEventType.Transfer, … ). There is an example here that shows using TraceEventType.Transfer (as well as explicitly calling TraceTransfer).

By this point, maybe I am actually starting to answer my own question…

It seems like TraceSource.TraceTransfer is explicitly doing something with the ActivityID that is passed as a parameter whereas calling TraceSource.TraceEvent(TraceEventType.Transfer, …) is not explicitly doing anything with the ActivityID (since it is not passed as a parameter). It seems like it is really just logging another event, that happens to be a Transfer event, but does not do anything else with the CorrelationManager or anything else.

Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:23:18+00:00Added an answer on May 18, 2026 at 12:23 am

    According to the MSDN documentation for TraceSource.TraceTransfer, TraceSource.TraceTransfer calls TraceListener.TraceTransfer. The base implementation of TraceListener.TraceTransfer simply calls TraceListener.TraceEvent(TraceEventType.Transer, …), passing a string representation of the guid passed to TraceSource.TraceTransfer.

    So, it seems to me that TraceSource.TraceTransfer provides way to explicitly indicate that an activity transfer is happening. At the call site, it is more obvious and more typesafe to use TraceSource.TraceTransfer. If implementing a TraceListener, you could take advantage of the explicit TraceTransfer call and the fact that the activity id is passed in as a Guid to do any special work that you want to do when an activity id is transferred.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm investigating the differences between using log4net and System.Diagnostics.Trace for logging, and I'm curious
I am in the process of converting our logging implementation to use System.Diagnostics.TraceSource. We
Anyone knows the difference between System.Diagnostic.Trace and System.Diagnostic.TraceSource classes? I've been using Trace for
I have implemented tracing based on System.Diagnostics. I am also using a System.Diagnostics.TextWriterTraceListener, and
It's common knowledge that using System.Diagnostics.Process.Start is the way to launch a url from
I have a simple Tray icon program that opens a site using System.Diagnostics.Process.Start(URL) And
Currently using System.Web.UI.WebControls.FileUpload wrapped in our own control. We have licenses for Telerik. I
I'm using System.Diagnostics.ProcessStartInfo to set up the parameters for launching a process from a
I've been using System.Diagnostics.Process.Start(). For example: string target = @c:\te=mp\test; System.Diagnostics.Process.Start(explorer.exe, target) The target
I'm using System.Diagnostics.Process to execute an svn command from a windows console application. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.