WebClient.UploadFile(saveFile,fileNamePath);
用这个方法上传提示System.UnauthorizedAccessException: 对路径“....”的访问被拒绝。 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) 在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) 在 Tongxin.Web.contorl.uploadimg.UpLoadFile(String fileNamePath) 在 Tongxin.Web.contorl.uploadimg.ProcessRequest(HttpContext context)