Guest User

Untitled

a guest
Jan 14th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. Session session = null;
  2.  
  3. try
  4. {
  5. // Setup session options
  6. SessionOptions sessionOptions = new SessionOptions
  7. {
  8. Protocol = Protocol.Ftp,
  9. HostName = HostName,
  10. UserName = UserName,
  11. Password = Password,
  12. Timeout = TimeSpan.FromDays(1),
  13. };
  14.  
  15. using (session = new Session())
  16. {
  17. // Connect
  18. session.Open(sessionOptions);
Add Comment
Please, Sign In to add comment