rip*_*234 4 .net windows file-access
执行File.WriteAllText远程路径抛出UnauthorizedAccessException.当我在记事本中打开文件时,我可以毫无问题地编辑它.尝试修改文件的进程作为我自己的用户帐户运行,因此它应该能够访问它.
Jay*_*ggs 11
根据MSDN,UnauthorizedAccessException也可能是由:
Run Code Online (Sandbox Code Playgroud)path specified a file that is read-only. -or- This operation is not supported on the current platform. -or- path specified a directory.
这些条件中的一个是否可能是您的问题的原因?