Using a Text Editor to Develop and Deploy an ASP.NET Web Application
page 7 of 8
by Andrew Mooney
Feedback
Average Rating: 
Views (Total / Last 10 Days): 36951/ 69

Deploying Our Sample Application

Once we have seen our web application in action all that is left is to deploy it to a test server or straight to the live server. Once again we have the choice of creating a batch file or setting up a User Tool in Crimson Editor. The batch file to deploy our web application is shown in Listing 6. As you can see, we will accomplish this using the xcopy command.

Listing 6 - Deploy.bat used to deploy our web application

xcopy /i /s /y /exclude:Excludes.txt C:\Projects\WebApp1 C:\Projects\WebApp1_Deploy 
 pause

Here is an explanation of the parameters used with xcopy. Using the /y parameter saves time, but you can decide how you use it. The source and destination directory need to use the physical path.

/s : Copies directories and subdirectories, unless they are empty.

/i : If a directory in destination does not exist, xcopy creates a new directory.

/exclude:Excludes.txt : Specifies a file containing a list of file extensions to exclude.

/y : Suppresses prompting to confirm that you want to overwrite an existing destination file.

To set this up in Crimson Editor, select Conf. User Tools from the Tools menu. And in the Preferences dialog box, fill in the fields for the third User Tool using the following and also take a look at Image 3 below.

Menu Text: Deploy - WebApp1

Command: C:\Windows\system32\xcopy.exe

Argument: /I /s /y /exclude:Excludes.txt C:\Projects\WebApp1 C:\Projects\WebApp1_Deploy

Initial Dir:

Hot Key: None

Close on exit: yes

Capture Output: no

Use short file names: no

Save before execute: no

Figure 3 - Setting up a User Tool to deploy a web in Crimson Editor

 

Listing 7 - Excludes.txt

.bat
.prj
.txt


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-05-08 10:13:32 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search