title: How to get access public_ftp and server files in asp.net c#?
body: <p>I have store images in <code>public_ftp</code>. Now how can i access <code>public_ftp</code> files. I have link and also <code>username</code> and <code>password</code>.But how can i use <code>public_ftp</code> link in <code>server mappath</code>.</p>
  
  <pre><code>   string[] filePaths = Directory.GetFiles(Server.MapPath("~\\screenshots\\" +eventID));
              IEnumerable&lt;string&gt; filess = Enumerable.Empty&lt;string&gt;();
              // Get all the files in the sourceDir
              foreach (string name in myList)
              {
  
                  string fname = name;
                  path = Server.MapPath("~\\screenshots\\" +eventID+"\\" + fname);
                  if (System.IO.File.Exists(path))
                  {
                      var attachment = new System.Web.Mail.MailAttachment(path);
                      myMail.Attachments.Add(attachment);
                  }
  
              }
  </code></pre>
  
  <p>How can i use ftp link in <code>Server.MapPath('FTP LINK')</code> Also let me know how can i access server files if someone store files on server and he provide me credentials and i want to access images and use in application. I don't want to store images in my hosting server due to privacy.</p>