This is a migrated thread and some comments may be shown as answers.

How to use the ftp connection

3 Answers 197 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Martial
Top achievements
Rank 1
Martial asked on 11 Jun 2012, 02:51 PM
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

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 14 Jun 2012, 03:07 PM
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.
0
Martial
Top achievements
Rank 1
answered on 14 Jun 2012, 03:12 PM
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.
0
Dobromir
Telerik team
answered on 18 Jun 2012, 10:34 AM
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.
Tags
FileExplorer
Asked by
Martial
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Martial
Top achievements
Rank 1
Dobromir
Telerik team
Share this question
or