473,320 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Where to store custom error log

I want to write some custom error messages to a log so that I can read them
on the next run of the application and as the user to send them to me.

Where the right place to store this log file? Which directory path is the
right one - so that it's always writable regardless of the user's
permissions. I guess it's more of an application-level log than a user-level
log. Or maybe not.

Is there an up-to-date (e.g. .NET 3.5/Vista specific) description of what
the various system directory paths are for?

Jun 27 '08 #1
3 1579
On Apr 21, 6:04*am, <Debbie.Cr...@nospamforme.comwrote:
I want to write some custom error messages to a log so that I can read them
on the next run of the application and as the user to send them to me.

Where the right place to store this log file? Which directory path is the
right one - so that it's always writable regardless of the user's
permissions. I guess it's more of an application-level log than a user-level
log. Or maybe not.

Is there an up-to-date (e.g. .NET 3.5/Vista specific) description of what
the various system directory paths are for?
string sLogFolder =
Environment.GetFolderPath(Environment.SpecialFolde r.LocalApplicationData)
+ "\\" + Application.CompanyName + "\\" + Application.ProductName

is how I do it.
Jun 27 '08 #2
Create an application event at the event log and store that there. So that
next time you run the app, your app can read that first and from there it
can further go ahead.

HTH
<De**********@nospamforme.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>I want to write some custom error messages to a log so that I can read them
on the next run of the application and as the user to send them to me.

Where the right place to store this log file? Which directory path is the
right one - so that it's always writable regardless of the user's
permissions. I guess it's more of an application-level log than a
user-level log. Or maybe not.

Is there an up-to-date (e.g. .NET 3.5/Vista specific) description of what
the various system directory paths are for?
Jun 27 '08 #3
On Apr 21, 6:04*am, <Debbie.Cr...@nospamforme.comwrote:
I want to write some custom error messages to a log so that I can read them
on the next run of the application and as the user to send them to me.

Where the right place to store this log file? Which directory path is the
right one - so that it's always writable regardless of the user's
permissions. I guess it's more of an application-level log than a user-level
log. Or maybe not.

Is there an up-to-date (e.g. .NET 3.5/Vista specific) description of what
the various system directory paths are for?
In our application we just write to a network folder. We write a file
per user, whenever we got an exception with some details that usually
the user don't have access or forget to tell, program name, error
message, stack, etc. The user just says the system is not working...:)
Of course this is our case...

Alcides Schulz
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Jonas Rundberg | last post by:
Hi I just started with c++ and I'm a little bit confused where stuff go... Assume we have a class: class test { private: int arr; };
3
by: Bob | last post by:
I am a new java convert to asp.net. I'm trying to create an web application that will allow users to change their custom settings easily. Is there a class in .net that is similar to java's...
7
by: Yongsub Eric Shin | last post by:
Hi. I'm just a beginner in ASP.Net. I started writing codes and I keep on getting this Runtime Error page, where it says "Description: An application error occurred on the server. The current...
5
by: Guadala Harry | last post by:
What are my options for *securely* storing/retrieving the ID and password used by an ASP.NET application for accessing a SQL Server (using SQL Server authentication)? Please note that this ID and...
3
by: Darren Clark | last post by:
Basically i am curious as to where everyone stores there database details for ASP.NET apps? When developing controls i usually stored it in the web.config file. Then i move it to a internal...
1
by: RA | last post by:
Hi I have an xml schema and I have created a dataset from that schema. I have a web service that recieve info and sends back an xml information. I send back the xml using SchemaDataset.WriteXml...
6
by: BookerW | last post by:
Ok interesting, on my local machine And i did not do a good job of keeping track of the exact order.... but on my local machine in which i have vis studio 2003 installed and IIS for win XP,...
10
by: Brett Romero | last post by:
I'd like to store something such as the following the my app.config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="DEBUG" value="true"/> <add...
4
by: Dave | last post by:
I have some data values that will will rarely change over the life of the program. I don't think it is wise to save it in a database. Is it ok to save them in Properties.Settings if I have many...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.