As Manfred explained, the server usually don't have permission to write to this location. The locations like that are simply illegal; you should use appropriate directory under "Users" or "Documents and Settings". Also, there are no cases when any hard-coded path name could be useful, ever. All path names are always calculated during run-time, based on assembly location (for read-only files only), environment of configuration files.
But you don't need to do even that. For logging, use the system log via the class
System.Diagnostics.EventLog
,
http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.aspx[
^].
For some more useful detail and idea, please see my past solutions:
How to create event log under a folder[
^],
MsBuild OutPut to the TextBox on the fly in Windows Application[
^].
This way, you can make logging structured per you project, redirect it, etc.
—SA