How to use the ftp connection

4 posts, 0 answers
  1. Martial
    Martial avatar
    4 posts
    Member since:
    May 2012

    Posted 11 Jun 2012 Link to this post

    Hello,

    I have a problem with this KB : http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/ftpcontentprovider.aspx .

    I need to use a FTP connection in my RadFileExplorer. I dont understand what I should do.
    Can you explain me what I must include in my solution ?

    How can I create a FTP provider and use it ?


    Thanks for getting back to me. 


    PS : Sorry for my english, I'm french programmer
  2. Rumen
    Admin
    Rumen avatar
    12848 posts

    Posted 14 Jun 2012 Link to this post

    Hi,

    There are two working projects attached to the KB article:

    What you should do is to update the FtpSettings.config file with the information about your FTP server, your FTP user and password, as well as a temp folder where the files will be downloaded

    <?xml version="1.0"?>
    <appSettings>
      <!--The name of the FTP server. Should not contain the full path to a folder - just the server's address-->
      <add key="FtpServerName" value="ftp://localhost"/>
      <!--User name for login. If the username is not required for connecting to the server, then leave it empty but do not remove it-->
      <add key="UserName" value="put here the username"/>
      <!--Password for login. If the password is not required for connecting to the server, then leave it empty but do not remove it-->
      <add key="Password" value="put here the password"/>
      <!--The path to a virtual folder which will contain the buffered file (when copying a file). This is necessary, because when the FileCopy method is
        performed, the file is downloaded from the FTP server and then immediately uploaded to the new location in the Ftp server-->
      <add key="TempDirectoryPath" value="~/Temp"/>
      <!--Path to the ASHX handler which will serve the files to the browser-->
      <add key="ItemHandlerPath"
           value="~/FtpFileSystemHandler_Cs.ashx"/>
    </appSettings>

    If you want to learn more about the custom file browser content providers see this help article and live demo:
    http://www.telerik.com/help/aspnet-ajax/fileexplorer-custom-filebrowsercontentprovider.html
    http://demos.telerik.com/aspnet-ajax/fileexplorer/examples/server-sideapi/dbfilebrowsercontentprovider/defaultcs.aspx


    Kind regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Martial
    Martial avatar
    4 posts
    Member since:
    May 2012

    Posted 14 Jun 2012 Link to this post

    Hi,

    Thank you Rumen.

    I have a last question. In Default_Cs.aspx.cs it's use FtpContentProvider type. But I don't find where it's define or where can I found it.

    Regards.
  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 18 Jun 2012 Link to this post

    Hi Martial,

    The FtpContentProvider class is defined in the CustomFtpProvider.cs file located in the App_Code folder of the sample page's archive.

    All the best,
    Dobromir
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top