내 웹 응용 프로그램에서 파일을 사용자 컴퓨터에서 서버로 이동해야합니다. 이 작업을 수행하려면 ascx 구성 요소를 사용해야합니다. 소스 파일이 "내 문서"또는 "내 그림"또는 "사용자"폴더 안에 하위 폴더 같은 폴더에있을 때File.Move() access denied ASP.NET
Private Function FileReplciate(ByRef FilePath As String)
'FilePath is the full file path e.g C:/Program Files/file.txt
' Create an id to hide the original file name (for security)
Dim id = New Guid;
Try
'Here I move the file using File.Move() here is the error
File.Move(FilePath, Server.MapPath("temp\" & id.ToString))
Catch ex As exception
End Try
End Function
그래서 내가 액세스 거부 오류가 발생했습니다 : 여기
코드입니다 .원본 파일이 "C : \"또는 "C : \ ProgramFiles"와 같은 폴더에있을 때이 오류가 발생하지 않습니다.
이미 시도하고 같은 오류가 발생합니다. –