Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand

Posts Tagged ‘ftp’

Deploying ASP.NET application to Production Server using FTP

Posted by JP on November 30, 2010

Visual Studio really makes it simple for deploying web applications.

In this article we are going to use FTP for deployment.

Scenario

Hope you have a web application with multiple folders and dozens of file.  Selecting each item and uploading to the site is really tedious job.  We can simplify it by the following.

Pre-requisites

You should have the following:

  • FTP Server Name
  • Username and Password
  • Folder on server

Deployment

Open the solution and right click on the web project and choose the option Publish.

image

You should see the following dialog window.

image

Click on the “…” button highlighted against the Target location item.

You will be prompted with the dialog box below.

image

Enter your Server name, Directory, Username and Password.

Uncheck the Anonymous Login checkbox.

After entering, cilck the Open button.  This will close the dialog box.

Now you can click Publish to do the deployment.

Advertisements

Posted in ASP.NET, IIS | Tagged: , , , | Leave a Comment »

FTP Commands to upload file

Posted by JP on October 30, 2010

Sometimes you might end up with a machine where the ftp tools are not accessible.  Here we can use the ftp.exe command line tool along with Windows Operating system.

Step1:

Type ftp in the windows run command box.

image

Step2:

In the appearing command line window type open www.yoursite.com. (I am typing my site named www.fortuneanalyst.com)

It will be prompting for the user name and password.

image

Step3:

Type your username and press enter.  Wait for 2 seconds and you will be prompted for the password.  Type the correct password and press enter.  Wait for 2 seconds and if the password is valid you will be getting the message”User * logged in”.

Note: The password typed won’t be displayed on the screen.

image

If you can see the above message Congratulations!!! You have successfully logged in.

Now we can move to the next step

Step 4:

Type the command dir in the above screen.  Wait for 2 seconds.  You will be listed with the directories and files in the root folder.

Step 5:

Create a new directory named “fxlogics”.  For creating a new directory use command

mkdir fxlogics

Step 6:

Copy files to the new directory.

First we have to change the directory to fxlogics.  For this type the command

cd fxlogics

Step 7:

You can ensure you are in the correct directory by entering the dir command again.

Step 8: Upload File

Here you are uploading a file from the local computer to the ftp site’s current directory.

Use command put filepath

Alternatively you can type put and drag and drop the file from explorer to the command window.  So the exact path will be shown correctly.

Eg: put c:\readme.txt

Step 9:

Ensure the file is copied correctly by typing the dir command again.

If you can see the file in the command screen you have uploaded the file successfully.

Step 10:

Close the command window by typing the quit command.

More Commands

Command Description Example
help Shows the commands list help
quit Closes the ftp window quit
dir Displays the directory contents dir
cd Change directory cd mydir
mkdir Make Directory mkdir newdirname
put Uploads a file from the local file system. put “c:\program files\a.txt”
delete Deletes the file from the directory delete “the file name.exe”

 

Tips

You can use the up and down arrow while in the command window, to traverse between the commands typed.  It will save the time and effort to type the command again.

Hope you enjoyed the article 🙂

Posted in C# | Tagged: , , , | 2 Comments »