Copying file from Remote server to local and vice versa

前端 未结 2 511
梦如初夏
梦如初夏 2021-01-16 19:33

thanks for ur quick response. but im stucked with login only. im using following code to try to login:

bool success = LogonUser(\"username\", \"000.000.000.         


        
2条回答
  •  北恋
    北恋 (楼主)
    2021-01-16 20:04

    We have a similar scenario in our project. We have created a user on the domain which has required permission on local and remote server (both servers in same domain). We have a windows service as well as web application both configured to run under this user context. Hence we don't get permission issues when coping the file to and from remote server.

    However if the remote server is not on the same domain, then you either user Impersonation(if possible) or configure a ftp server on remote machine. You can then upload and download files using ftp protocol.

提交回复
热议问题