Fail Safe Error Logging

Nov 22 2006 10:56 AM
We have an ASP.NET Application that we are beginning to roll out. we are in the testing phase and want to make sure that we log any error. right now we log to email, eventlog and database. if these fail the error would log to a text file. all of these options depend on a config key that is written in the web config or machine config file. What has been requested is to find a way to log an error without any configuration. the application should do all of the configuring. the reason is we sometimes forget to add the keys in or change some value between the development, testing and production servers. One way that we have been thinking is to create a text file on the web server away from the website directories. somewhere like D:\ErrorLogs and have the application worry about setting up the permissions to write to the file system. I dont know if this is possible to set up permissions to write a file to our web server that we have full control over. Is this the best way to go? If it is can someone help with how to have the web server set up permissions and create the file. Or is there a better solution? the idea is we do not want to have to worry about any configurations. it should be ready to go with the rest of the application. Any help would be greatly aprreciated.