How to Deploy a Web Application in ASP.NET

October 26, 2006 at 12:00 pm (ASP.NET, Web Design)

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.

Advertisements

14 Comments

  1. Bala said,

    Hi…
    It was really helpful for me in my current project

  2. Ruchi Batra said,

    I tried,but didnt worked

  3. Mitch said,

    Ruchi contact your Server host ask them to run this for you . I had some trouble with it too. I had my Host Server Intellect techs get this running for me.

  4. sats said,

    hey even m facin this problem…please i need help regardin deployment….cz m unable to put it on server..n cant install the aplication on client machines..as they are not too strong fpor .net application..please help me if u can..
    i did the same procedure as u told me but it dint worked..its givin error..please tell me wht shud i type in browser means plz tell me in details wht path shud i giv in browser plz try to eplain it with example..if u can
    thankin u
    sats

  5. Vyas said,

    its working, try 2 give solutions with screenshots .

  6. Madhu Babu said,

    Hey its working fine but when i deploy on client system entire code is getting extracted. Can you plz tell me how to avoide extracting code files(aspx pages)

  7. siya said,

    how do you print multiple tables using a crystal report

  8. Rohit Jain said,

    hi i am a rohit jain from padwa n m a lus papad vaniya

  9. Michael said,

    Wow. It worked for me swiftly!!!!!!

    Pliz professor, kindly help me with connectiong mysql to ASPnet. I can’t wait…. Thanks in advance

  10. anand kumar4 said,

    I have a prob……….. I don’t know how to deploy Asp.net project
    my no:96797951111,7384528212

    • Krishan Gahlot said,

      Just go to this link
      csharpdemos.blogspot.in/2012/08/how-to-deploy-aspnet-website-using-iis-7.html

  11. Krishan Gahlot said,

    A complete article with screen shots to learn how to deploy a website or web application using iis.
    csharpdemos.blogspot.in/2012/08/how-to-deploy-aspnet-website-using-iis-7.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: