FileStream.Write抛出UnauthorizedAccessException

时间:2014-05-03 10:33:28

标签: .net file-io file-permissions base-class-library

为什么我会在成功创建FileStream对象后获得UnauthorizedAccessException?

System.UnauthorizedAccessException: 对路径的访问被拒绝。
   在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   在 System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
   在 System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)
   在 System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
   在 System.IO.Stream.CopyTo(Stream destination)
   在 Deerchao.Update.Updater.CopyNewFiles(VPath folder)
   在 Deerchao.Update.Updater.CopyNewFiles()
   在 Deerchao.Update.Updater.Update()
   在 Update.Program.UpdateApplication(String source, String target, String log, Boolean deleteSource)

0 个答案:

没有答案
相关问题