473,774 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1595
On Apr 21, 6:04*am, <Debbie.Cr...@n ospamforme.comw rote:
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.Get FolderPath(Envi ronment.Special Folder.LocalApp licationData)
+ "\\" + Application.Com panyName + "\\" + Application.Pro ductName

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**********@n ospamforme.comw rote in message
news:%2******** ********@TK2MSF TNGP03.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...@n ospamforme.comw rote:
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
5052
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
1946
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 Property class that can deal with user's custom settings?
7
2861
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 custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
5
4514
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 password would be different than the one the user enters for ASP.NET forms authentication. The ID/password in question is used by the application, itself, for accessing the SQL Server. Thanks in advance.
3
1381
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 private property that is only acessable from my DB classes. What other methods do people use? Encryption and then store in the webconfig? or registry? or encrypt then registry?
1
1831
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 (...) A consumer of the web service then call a different method of the web service which takes an xml string as an input parameter. I need to load this xml string into the Schemadataset. I do that using the following:
6
2809
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, I copied the web.config file from the source code folder into the inetpub\wwwroot folder b/c that is where the ASP engine was looking for it.
10
3675
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 key="DEBUGCleanFile" value="true"/> </appSettings>
4
1800
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 different values? Example I want to save information about the user of the software, eg, name, address, telephone #. -- L. A. Jones
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10040
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.