I need do some quick and dirty logging and I was asked to write to a file.
I have done all the logging and now I need to save it somewhere on this Win Server 2008 Operating system.
Does anybody know what the output is in Win Server 2008 for the following line of code. string myPath=Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
Thanks a lot.
Most likely it is
%systemdrive%\ProgramData
...which is probably
C:\ProgramData
unless Windows 2008 was installed on a drive other than C: (uncommon). Part of the reason Environment.SpecialFolder exists is so we don't have to think about these things.
http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.