Saturday, 13 April 2013

Steps to Deploy Web Application in ASP.Net

To Deploy the Web Application You have created in ASP.NET follow the steps:-

1. Open the Web application project that you want to deploy. In this case,open the SampleVB     project.

2.Select File->New Project to open the New Project Dialog box.

3. From the Project Types pane, select Setup and Deployment Projects.From the Templates pane, select Web Setup Project.

4. Change the default name of the project. In this case, change it to “SampleVBDeploy.”

5. Click OK to complete the process. The project is added in the SolutionExplorer window. Also, a File System editor window appears to the left.The editor window has two panes. The left pane displays different items. The right pane displays the content of the itemselected in the left pane.

6. Select Web Application Folder in the left pane of the File System editor window
 

7.Then,from the File menu select Add -> Existing Website to open the Add Existing WebSite Dialog box.Choose the Web Application that you want to Deploy(In our case its SampleVB).The Web Application will be added in the Solution Explorer Window 

8.Then, from the Action menu, select Add ® Project Output to open the Add Project Output Group dialog box.

9. Verify that SampleVB is selected in the Project drop-down list. Then,select Content Files from the list.

10. Click OK. The content files of the SampleVB project are added to the solution.

11. Select Web Application Folder in the File System editor and select Properties Window from the View menu to open the Properties window.

12. Set the VirtualDirectory property to a folder, <folder name>, that would be the virtual directory on the target computer where you want to install the application. By default, this property is set to SampleVBDeploy,which is the name of the Web Setup project that youadded. In this case, set the property to DeployedApplication.

Caution The <folder name> should be a new folder name and should not already exist on the target machine. Otherwise, the contents in the folder will be overwritten.
 

13. In the same Properties window of the Web Application Folder, set the DefaultDocument property to Default.aspx. This property is used to set the default Web Forms page for the application.

14. Build the solution by selecting Build Solution from the Build menu.

15. After the solution is built successfully, a SampleVBDeploy.msi file is created in the Debug directory of the Web Setup project. The default path is \documents and settings\<login name>\My Documents\VisualStudioProjects\SampleVB\SampleVBDeploy\Debug\
SampleVBDeploy.msi.

16. Copy the SampleVBDeploy.msi file to the Web server computer (c:\inetpub\wwwroot) where you want to deploy the application.

17. Double-click the SampleVBDeploy.msi file on the target computer to run the installer.

Note To run the installer, you must have the install permissions on the computer. And, to install to the Web server, you must have IIS permissions.

After the installation is complete, you can run your application on the target computer. Todo so, start Internet Explorer and enter http://<computer name or IP Address>/DeployedApplication in the address box.

No comments:

Post a Comment