Friday, February 29, 2008

.NET Web Application Setup & Deployemnt

Step 1: Create an ASP.NET Web application
1. Start Visual Studio .NET or Visual Studio 2005.
2. Use Visual C# .NET or Visual C# 2005 or use Visual Basic .NET or Visual Basic 2005 to create an ASP.NET Web Application project. Name the project Project1.

Note In Visual Studio 2005, create an ASP.NET Web Site project.
3. On the Build menu, click Build Solution.

Step 2: Add a Web Setup project to your solution
1. In Solution Explorer, right-click the Project1 solution, point to Add, and then click Add New Project. The New Project dialog box appears.
2. Under Project Types, click Setup and Deployment Projects.
3. Under Templates, click Web Setup Project.
4. In the Name text box, type WebSetupProject1.
5. In the Location text box, type C:\DeployFolder, and then click OK.

Step 3: Add the Web application files to Your Web Setup project
1. In the File System (WebSetupProject1) window, right-click Web Application Folder, point to Add, and then click File. The Add Files dialog box appears.
2. Locate the C:\Inetpub\wwwroot\Project1 folder.
3. Select all the files that are in the Project1 folder, and then click Open.
4. In the File System (WebSetupProject1) window, expand Web Application Folder.
5. Under Web Application Folder, right-click bin, point to Add, and then click File. The Add Files dialog box appears.
6. Locate the C:\Inetpub\wwwroot\Project1\bin folder.
7. Click the Project1.dll file, and then click Open.

Step 4: Configure the Bootstrapper URL for your Web Setup project
1. In Solution Explorer, right-click WebSetupProject1, and then click Properties. The WebSetupProject1 Property Pages dialog box appears.
2. In the Bootstrapper list box, click Web Bootstrapper. The Web Bootstrapper Settings dialog box appears.
3. In the Setup folder URL text box, type http://devserver/Bootstrap1, and then click OK.

Note devserver is a placeholder for the name of your Web server.
4. In the WebSetupProject1 Property Pages dialog box, click OK.
5. In Solution Explorer, right-click WebSetupProject1, and then click Build.

Step 5: Copy files to the bootstrapping application folder
1. In the C:\Inetpub\Wwwroot folder, create a folder that is named Bootstrap1.
2. Create a virtual directory that is named Bootstrap1, and then map this virtual directory to the C:\Inetpub\wwwroot\Bootstrap1 folder.
3. Copy the following files from the C:\DeployFolder\WebSetupProject1\debug folder to the C:\Inetpub\wwwroot\Bootstrap1 folder: • Setup.Exe
• WebSetupProject1.msi


Step 6: Run your Web Setup project on a remote (deployment) computer
1. Start Microsoft Internet Explorer.
2. Type the following URL in the address bar, and then press ENTER:
http://devserver/Bootstrap1/Setup.Exe
Note devserver is a placeholder for the name of your Web server.
3. In the File Download dialog box, click Open.
4. In the Security Warning dialog box, click Yes.
5. In the WebSetupProject1 dialog box, click Next.
6. Keep WebSetupProject1 in the Virtual directory text box. Click Next.
7. On the Confirm Installation page of the WebSetupProject1 dialog box, click Next.
8. On the Installation Complete page of the WebSetupProject1 dialog box, click Close.
9. Locate the C:\Inetpub\wwwroot\WebSetupProject1 folder.
10. Open the following file in a text editor such as Notepad:• If you are using Visual C# .NET or Visual C# 2005, open the Project1.csproj.webinfo file.
• If you are using Visual Basic .NET or Visual Basic 2005, open the Project1.vbproj.webinfo file.

11. Modify the URLPath element as follows:

Visual C# .NET or Visual C# 2005 code


Visual Basic .NET or Visual Basic 2005 code



12. Save the file as one of the following, depending on your project:• If you are using Visual C# .NET or Visual C# 2005, save the file as WebSetupProject1.csproj.webinfo.
• If you are using Visual Basic .NET or Visual Basic 2005, save the file as WebSetupProject1.vbproj.webinfo.

13. Open the following file, depending on your project:• If you are using Visual C# .NET or Visual C# 2005, open the Project1.csproj file.
• If you are using Visual Basic .NET or Visual Basic 2005, open the Project1.vbproj file.
You may receive the error message that appears in the "Symptoms" section of this article.

No comments: