System.Net.WebException: An exception occurred during a WebClient request.
System.UnauthorizedAccessException: Access to the path "路径" is denied.
1.权限问题,在根目录上添加权限IIS_IUSRS 完全控制权限
2.if (Directory.Exists(dir) == false) Directory.CreateDirectory(dir);
dir为文件的全路径,改为单纯目录路径
我是操作了这两个,才能正常上传。