.net - UnauthorizedAccessException when writing text file to C:\ on Windows 7 -
i have moved windows 7. .net application fails writing log file c:\
my tracelistener throwing exception.
a first chance exception of type 'system.unauthorizedaccessexception' occurred in mscorlib.dll what do? running application studio , think must inherit rights , admin on pc.
if have uac enabled won't able write files c:\, if you're admin, unless start program in elevated mode activate admin privileges.
files shouldn't placed in root of c:, best create subdirectory , give access rights (to account, not administrators group). if want have file on c:\ , not run elevated, can use windows explorer grant (your account, not administrators group) write access c:\.
Comments
Post a Comment