Tutorials to .com

Tutorials to .com » Dotnet » Winform » WEB application using VS.NET2003 making the installation package

WEB application using VS.NET2003 making the installation package

Print View , by: iSee ,Total views: 16 ,Word Count: 1292 ,Date: Sun, 23 Aug 2009 Time: 10:08 PM

Vs.net2003 to make use of an installation procedure is very convenient, even if it is to produce a web application's installation process is also true. Only a few simple steps can be completed.

First of all, to create a Setup and Deployment Projects. Steps are as follows:
1. In the "Solution Explorer" in the solution to add a new item.
Right-click the solution in the pop-up menu, select "Add" - "" New Project. " In the dialog box that opens, select the "Setup and Deployment Projects" and choose "Web Setup Project" template. Enter the project name in, click "OK" button, new items will be added to the solution.
2. The project output will be added to the installation and deployment project.
When you are done adding items to install and deploy, vs.net2003 IDE will automatically open a "file system" Manager. Right-click the right side of the Manager tree structure "Web application Folder" in the pop-up menu, select "Add" -> "Project Output." In the pop-up dialog box, select the "Project" (At this time there is only one, is your web application project), and then in the following list, select the "main output" and "the contents of a document," the two (you can check) , and then in the "configuration" select "Release. NET", click "OK" button.

After two steps above, a basic installation and deployment process was completed on the production, this project has been compiled after a Web installation package.

However, in many cases, we do have to use Web applications to the database during the installation process can also install it with the database? The answer is yes. So how do? Mr. Li Honggen this issue has been resolved, the specific content of the article refer to the following
http://blog.csdn.net/lihonggen0/archive/2004/05/17/13654.aspx
Mr. Li Honggen the article describes in detail the installation process of the production and how to install the database at the same time. In this more or less as follows:
1. Create a new Class Library project, delete the automatically generated Class.cs, re-add a new item. Right-click the item in the pop-up menu, select "Add" -> "Add New Item" in the pop-up dialog box, select the "Setup type."
2. Create a custom installation dialog box. Right-mouse click on the "Solution Explorer" in the installation and deployment projects, in the pop-up menu, select "view" -> "user interface." In the open "user interface" Manager, right-click "start" in the pop-up menu, select "Add dialog box." In the dialog box that opens, select "text box (A)". Select "text box (A)", in the properties, followed by Property set containing attribute CUSTOMTEXT1, CUSTOMTEXT2, CUSTOMTEXT3, CUSTOMTEXT4.
3. Create a custom operation. Right-mouse click on the "Solution Explorer" in the installation and deployment projects, in the pop-up menu, select "view" -> "Custom Actions." In the "Custom Actions" Manager, right-click "Install" in the pop-up menu, select "Add Custom Action." In the open dialog box, in the "Look in" select "Web Application Folder", select the following list of "main output from Install1 (activity)" (Install1 is the "Setup type" where the project name. If the list does not, you can use the above-mentioned "project output will be added to the installation and deployment project" approach to add). And then in the "Custom Actions" select manager just add content, set up in the Properties window CustomActionData attributes / dbname = [CUSTOMTEXT1] / server = [CUSTOMTEXT2] / user = [CUSTOMTEXT3] / pwd == [CUSTOMTEXT4] / targetdir = "[TARGETDIR] \"
Note: the contents of each set to / separated, and separated by spaces.
4. Install in the rewriting of such methods, and add the following code
string strConn = String.Format ( "data source = (0); user id = (1); password = (2);", this.Context.Parameters [ "server"], this.Context.Parameters [ "user" ], this.Context.Parameters [ "pwd"]);
this.ExecuteSQL (strConn, "master", "CREATE DATABASE" + this.Context.Parameters [ "dbname"]);

System.Diagnostics.Process pSQL = new System.Diagnostics.Process ();
pSQL.StartInfo.FileName = "osql.exe";
pSQL.StartInfo.Arguments = String.Format ( "-U (0)-P (1)-d (2)-i (3) db.sql", this.Context.Parameters [ "user"], this.Context . Parameters [ "pwd"], this.Context.Parameters [ "dbname"], this.Context.Parameters [ "targetdir"]);
pSQL.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
pSQL.Start ();
pSQL.WaitForExit ();
pSQL.Close ();
In this way, the installation program after the compiler can be installed even with the database.

The installation of the database problem has been solved, there is a problem, and that is to run ASP.NET, an important condition is that the target computer must have. NET framework, it can not be together when the installation process will be. NET framework for a installed it? The answer is yes. Refer to specific
http://www.microsoft.com/china/MSDN/library/netFramework/netframework/Nfdnnetdepvsredistdeploy1_1.mspx
In this article refers to several different methods of re-circulated. NET framework, the most simple to use should be considered a kind of a VS.NET2003. General steps are as follows:
1. VS.NET framework installed plug boot. The plug-ins can be downloaded from Microsoft's Web site, download the following address:
http://www.microsoft.com/downloads/details.aspx?familyid=627921a0-d9e7-43d6-a293-72f9c370bd19&displaylang=en
2. In the "Solution Explorer", the right-click Setup and Deployment Projects in the pop-up menu, select "view" -> "start conditions", open the "start condition" Manager.
3. In the "start condition" Manager, right-click on the "request on the target computer" in the pop-up menu, select "Add registry startup conditions." You will find in the "search for the target computer" in more than a "search RegistryEntry1", in the "start conditions" in more than a "Condition1".
4. Select "Search RegistryEntry1", in the "Properties" dialog box to complete the following:
Property: MDACSEARCH
RegKey: software \ Microsoft \ DataAccess
Root: vsdrrHKLM
Value: FullInstallVer
Select "Condition1", in the "Properties" dialog box to complete the following:
Condition: MDACSEARCH> = "2.6"
To carry out this step because of the installation. NET framework when the need MDAC.

OK, now to install and deploy the project to compile, it has been installed at the same time a. NET Framework Setup.



.Net Windows development Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.