Posted on 2012-09-02
Last Modified: 2012-10-11
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
Question by:praveen1981
    LVL 25

    Accepted 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.

    Author Closing Comment

    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

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now