[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 314
  • Last Modified:


in app.config

<?xml version="1.0"?>
<startup><supportedRuntime version="v2.0.50727"/></startup>
    <trace autoflush="true"  indentsize="4">
        <add name="TraceListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="E:\trace.log" traceOutputOptions="DateTime" />
        <remove name="Default" />


and now i am using  following line in the code in c#

Trace.WriteLine("The Mail sending started ... ");

I am using this in C# Windows Applications.

But it is not writing to that trace file.

the file is existing in the correct path and it is having all the permissions

but i do not understand why it is not writing. do i missed any thing ,

 is the application also requried any permissions , if so how and where should i give the permissions

please guide me
1 Solution
Hope below link gives you more info. Hope you created the trace object as given in the link or followed as given in config file.

praveen1981Author Commented:
Thanks for your solution, but that doesn't worked out here and eventually we moved in to event log as suggested by lead.

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now