Install and deploy basic-Web Solution

Source: Internet
Author: User

In this walkthrough, you will create a simple Web Forms application using Visual Basic, and then create an installer to deploy the application to a Web server.

NoteWeb Setup Projects are not available in the Standard Edition of Visual Basic. NET. For more information, see Visual Basic Standard Edition Features.

To create the Web Forms application

  1. OnFileMenu, pointNew, And then chooseProject.
  2. InNew ProjectDialog box, selectVisual Basic ProjectsInProject TypesPane, and then chooseASP. NET Web ApplicationInTemplatesPane. InLocationBox, typeHttp: // localhost/WebApp1.
  3. ClickOKTo close the dialog box.

    The project is added to Solution Explorer, and the Web Forms Designer opens.

  4. SelectWeb FormsTab in the Toolbox.
  5. SelectButtonControl and drag it to the Web Form.
  6. Double-clickButtonControl to add an event handler for the button.
  7. In the event handler, add the following code:
    Button1.Text = "abc"

    This will change the text displayed on the button to "abc" when the button is clicked.

  8. OnBuildMenu, chooseBuild WebApp1To build the application.

To create a deployment project

  1. OnFileMenu, pointAdd Project, And then chooseNew Project.
  2. InAdd New ProjectDialog box, selectSetup and Deployment ProjectsInProject TypePane, and then chooseWeb Setup ProjectInTemplatesPane. InNameBox, typeWebDeploy.
  3. ClickOKTo close the dialog box.

    The project is added to Solution Explorer, and the File System Editor opens.

  4. In the Properties window, selectProductNameProperty and typeWebApp1.

To add the output of the WebApp1 project to the deployment project

  1. In the File System Editor, selectWeb ApplicationFolder. OnActionMenu, pointAdd, And then chooseProject Output.
  2. InAdd Project Output GroupDialog box, chooseWebApp1FromProjectDrop-down list.
  3. ClickOKTo close the dialog box.
  4. SelectPrimary OutputAndContent FilesGroups from the list, then clickOK.

To set properties for the installer

  1. SelectWebApplicationFolder. In the Properties window, setVirtualDirectoryPropertyXyz.
  2. In the Properties window, setDefaultDocumentPropertyWebForm1.aspx.
  3. OnBuildMenu, chooseBuild WebDeploy.

To deploy the application to a Web server on your development computer

  1. In Solution Explorer, selectWebDeployProject. OnProjectMenu, chooseInstall.

    NoteYou must have install permissions on the computer in order to run the installer, and you must have IIS (Internet Information Services) permissions to install to the Web server.

  2. To access the Web application that was deployed, start Internet Explorer, and type the URLHttp: // localhost/xyz. Note that the text on the button changes to "abc" when you click the button on the Web page.

To deploy the application to a Web server on another computer

  1. In Windows Explorer, navigate to your project directory and find the built installer. The default path will be \ documents ents and settings \Yourloginname\ My Documents \ Visual Studio Projects \ WebApp1 \ WebDeploy \Project configuration\ WebDeploy. msi. The defaultProject configurationIs Debug.
  2. Copy the WebDeploy. msi file and all other files and subdirectories in the directory to the Web server computer.
  3. On the Web server computer, double-clickSetup.exeFile to run the installer.

    NoteYou must have install permissions on the computer in order to run the installer, and you must have IIS permissions to install to the Web server.

  4. To access the Web application that was deployed, start Internet Explorer, and type the URLHttp ://[ComputerName]/Xyz. Note that the text on the button changes to "abc" when you click the button on the Web page.

To uninstall the application

  1. In the Windows Control Panel, double-clickAdd/Remove Programs.
  2. InAdd/Remove ProgramsDialog box, selectWebApp1And clickRemove.
  3. ClickOKTo close the dialog box.

    TipTo uninstall from your development computer, onProjectMenu, chooseUninstall.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.