[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do I create a web directory in vb.net using ftp

Posted on 2009-05-07
1
Medium Priority
?
797 Views
Last Modified: 2013-11-07
I'm using visual studio 2005 and vb.net and need to create a folder on a remote webiste. I have full credntials for the site.
0
Comment
Question by:FUNDEZ
1 Comment
 
LVL 13

Accepted Solution

by:
iHadi earned 2000 total points
ID: 24330709
Hi

try the following:
        Dim destUri As String = "ftp://yourHostNameOrIp.com/DirToCreate"
        Dim username As String
        Dim password As String
 
        Dim ftpReq As FtpWebRequest = CType(WebRequest.Create(destUri), FtpWebRequest)
        ftpReq.Method = WebRequestMethods.Ftp.MakeDirectory
        ftpReq.Credentials = New NetworkCredential(username, password)
 
        ftpReq.Proxy = Nothing
 
        Dim ftpResp As FtpWebResponse = CType(ftpReq.GetResponse(), FtpWebResponse)
        Console.WriteLine("Code:" + ftpResp.StatusCode.ToString())
        Console.WriteLine("Desc:" + ftpResp.StatusDescription.ToString())

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question