Can you automate an FTP?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James Johnson

    Can you automate an FTP?


    Dear C#dex,

    You can automate a POST and interrogate the resulting HTTP stream using
    code such as:

    HttpWebRequest hwreq = (HttpWebRequest )WebRequest.Cre ate(url);
    hwreq.Method = "POST";
    hwreq.ContentTy pe = "applicatio n/x-www-form-urlencoded";
    hwreq.ContentLe ngth = buffer.Length;
    hwreq.Proxy = new WebProxy("Glori adias", true);
    hwreq.CookieCon tainer = new CookieContainer ();
    Stream RequestStream = hwreq.GetReques tStream();

    Is it possible to automate an FTP request such that you copy a web page
    to a web site automatically using a known FTP login?

    Thanks,

    James J.


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Drebin

    #2
    Re: Can you automate an FTP?

    I would guess you can make the URL for WebRequest.Crea te ftp, and then get
    rid of the method, contenttype and contentlength?


    "James Johnson" <jjohnso9@hotma il.com> wrote in message
    news:eUIdUHOnEH A.3664@TK2MSFTN GP11.phx.gbl...[color=blue]
    >
    > Dear C#dex,
    >
    > You can automate a POST and interrogate the resulting HTTP stream using
    > code such as:
    >
    > HttpWebRequest hwreq = (HttpWebRequest )WebRequest.Cre ate(url);
    > hwreq.Method = "POST";
    > hwreq.ContentTy pe = "applicatio n/x-www-form-urlencoded";
    > hwreq.ContentLe ngth = buffer.Length;
    > hwreq.Proxy = new WebProxy("Glori adias", true);
    > hwreq.CookieCon tainer = new CookieContainer ();
    > Stream RequestStream = hwreq.GetReques tStream();
    >
    > Is it possible to automate an FTP request such that you copy a web page
    > to a web site automatically using a known FTP login?
    >
    > Thanks,
    >
    > James J.
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it![/color]


    Comment

    • Ignacio Machin \( .NET/ C#  MVP \)

      #3
      Re: Can you automate an FTP?

      Hi,

      No AFAIK, There is no support for ftp in the framework, you could search
      for a third party component though. take a look at the archive as several
      have been posted in the past.

      cheers,

      --
      Ignacio Machin,
      ignacio.machin AT dot.state.fl.us
      Florida Department Of Transportation

      "James Johnson" <jjohnso9@hotma il.com> wrote in message
      news:eUIdUHOnEH A.3664@TK2MSFTN GP11.phx.gbl...[color=blue]
      >
      > Dear C#dex,
      >
      > You can automate a POST and interrogate the resulting HTTP stream using
      > code such as:
      >
      > HttpWebRequest hwreq = (HttpWebRequest )WebRequest.Cre ate(url);
      > hwreq.Method = "POST";
      > hwreq.ContentTy pe = "applicatio n/x-www-form-urlencoded";
      > hwreq.ContentLe ngth = buffer.Length;
      > hwreq.Proxy = new WebProxy("Glori adias", true);
      > hwreq.CookieCon tainer = new CookieContainer ();
      > Stream RequestStream = hwreq.GetReques tStream();
      >
      > Is it possible to automate an FTP request such that you copy a web page
      > to a web site automatically using a known FTP login?
      >
      > Thanks,
      >
      > James J.
      >
      >
      > *** Sent via Developersdex http://www.developersdex.com ***
      > Don't just participate in USENET...get rewarded for it![/color]


      Comment

      • John Timney \(Microsoft MVP\)

        #4
        Re: Can you automate an FTP?

        try wrapping ftp.exe with process.start and use a command script -s option

        --
        Regards

        John Timney
        Microsoft Regional Director
        Microsoft MVP


        "James Johnson" <jjohnso9@hotma il.com> wrote in message
        news:eUIdUHOnEH A.3664@TK2MSFTN GP11.phx.gbl...[color=blue]
        >
        > Dear C#dex,
        >
        > You can automate a POST and interrogate the resulting HTTP stream using
        > code such as:
        >
        > HttpWebRequest hwreq = (HttpWebRequest )WebRequest.Cre ate(url);
        > hwreq.Method = "POST";
        > hwreq.ContentTy pe = "applicatio n/x-www-form-urlencoded";
        > hwreq.ContentLe ngth = buffer.Length;
        > hwreq.Proxy = new WebProxy("Glori adias", true);
        > hwreq.CookieCon tainer = new CookieContainer ();
        > Stream RequestStream = hwreq.GetReques tStream();
        >
        > Is it possible to automate an FTP request such that you copy a web page
        > to a web site automatically using a known FTP login?
        >
        > Thanks,
        >
        > James J.
        >
        >
        > *** Sent via Developersdex http://www.developersdex.com ***
        > Don't just participate in USENET...get rewarded for it![/color]


        Comment

        • Mark Rae

          #5
          Re: Can you automate an FTP?

          "James Johnson" <jjohnso9@hotma il.com> wrote in message
          news:eUIdUHOnEH A.3664@TK2MSFTN GP11.phx.gbl...
          [color=blue]
          > Is it possible to automate an FTP request such that you copy a web page
          > to a web site automatically using a known FTP login?[/color]

          I don't believe it's possible natively with the current .NET Framework.
          However, there are several excellent 3rd party components such as Chilkat's
          FTP which will do exactly what you require...


          Comment

          • AlexL [Xceed]

            #6
            Re: Can you automate an FTP?

            Well, if you want a 100% managed implementation, we offer Xceed FTP
            for .NET.

            Tomorrow, we will be releasing v2.0, which adds support for
            asynchronous (non-blocking) calls, and Secure FTP via SSL.

            Take care.

            The URL is http://www.xceedsoft.com/products/ftpnet

            AL

            On Fri, 17 Sep 2004 21:50:32 +0100, "Mark Rae"
            <mark@mark-N-O-S-P-A-M-rae.co.uk> wrote:
            [color=blue]
            >"James Johnson" <jjohnso9@hotma il.com> wrote in message
            >news:eUIdUHOnE HA.3664@TK2MSFT NGP11.phx.gbl.. .
            >[color=green]
            >> Is it possible to automate an FTP request such that you copy a web page
            >> to a web site automatically using a known FTP login?[/color]
            >
            >I don't believe it's possible natively with the current .NET Framework.
            >However, there are several excellent 3rd party components such as Chilkat's
            >FTP which will do exactly what you require...
            >[/color]

            --
            Alex Leblanc
            Xceed Software Inc.


            Check out our advanced .NET zip file and compression library

            Email: xLeblancA@xceed soft.com (remove the first 'x')

            Comment

            Working...