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)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货