title: How can I handle the exception which throws on an external dll?
body: <p>I have developed a project which uses an external dll as FTPServer, I have created the  FTP Server on my project like this:</p>
  
  <p><code>private ClsFTPServer _ClsFTPServer;<br>
  _ClsFTPServer = new ClsFTPServer(FTPUserName, FTPPassword, FTPPath);</code> </p>
  
  <p>The Code above creates an instance of FTP server class, the class starts the FTPserver on it's constructor, it works fine independently as a module while the clients send their request correctly, but when an incorrect request comes to FTP server it throws an exception and cause my application to  crash.</p>
  
  <p>How can I handle the exception thrown by the external dll to prevent my application from crashing?</p>