location of a log file in 2.0

Posted on 2007-10-20
Last Modified: 2013-11-07
In ASP.NET 2.0 with C# When I have error I show an error page for the user and I also write all the details of the error into a log file for the managers of the site.
This file is located in "~/logs/ErrorLogWS.txt".
In order to write to this file I had to give permissions to the USER group in the IIS otherwise the writing was denied. Is it O.k. to put the errorlog in the place of the site or is their another recomendation.
Question by:ANAT2403
    1 Comment
    LVL 8

    Accepted Solution

    I'd recommend granting the ASP.NET Worker Process write access, and not the ISUR_<computer> account you mention in the post.

    To answer your question though, I don't personally see an issue with storing the log file within the web application directory.  Of course if you have custom deployment packages or something you have to be careful something else isn't going to blow away that directory (and remove your log files).

    Regardless, I usually store the logs under a directory like C:\Logs\ so I can find and refer to them quicker in a production app.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video discusses moving either the default database or any database to a new volume.

    729 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

    19 Experts available now in Live!

    Get 1:1 Help Now