Compiling and Deploying Web Projects

Team-Fly    

 
Visual Basic .NET Unleashed
By Paul Kimmel
Table of Contents
Chapter 18.  Using and Implementing Web Services


When you have finished testing and debugging your Web Service you are ready to compile and deploy it. Open the Configuration Manager for the Web Service and change the configuration from Debug to Release. Rebuild the Web Service.

Caution

If you leave the Configuration Manager configured to Debug when you build, a .pdb debug file is created and symbolic information remains in your Web Service. This extra overhead may make your Web Service a bit sluggish .


Visual Studio .NET saves all files before compiling. During compilation the .asmx, .vb, and global.asax files are compiled into the Web Service DLL. For example, our dice example is compiled into Dice.dll.

To deploy the application, you can add a Web Setup Project from the Add New Project dialog box, or you can simply copy the necessary files to the target Web server. (If the development server is the target Web server, you are finished.)

The ability to copy a Web Service is a matter of copying the folder containing the project files to your Web server's root directory, or if you want to get just the minimum files then use the Project, Copy Project menu. To deploy a Web Service using the Copy Project menu item, follow these steps (use Figure 18.11 as a guide):

  1. Choose View, Solution Explorer to open the Solution Explorer view.

  2. Click on the Web Service project.

  3. Choose the Project, Copy Project menu.

  4. In the Copy Project dialog box, specify the target Web server, the Web access method, and the Copy mode. (Select the option labeled Only Files Needed to Run This Application unless you have a specific reason for choosing one of the other options.)

  5. Click OK.

Figure 18.11. Use the Copy Project dialog box to deploy a Web Service.

graphics/18fig11.jpg

When you have completed step 5, the Web Service will be copied to the Bin folder in the Web directory and the web.config, .asmx, and global.asax files will be copied to your root folder. If you want the Web Service copied to a subfolder, specify the subfolder in the Copy Project dialog box.

That is all there is to it. Copy deployment is significantly easier than registering COM DLLs and coping with "DLL Hell." Your team or your customers are ready to begin using your Web Service.


Team-Fly    
Top
 


Visual BasicR. NET Unleashed
Visual BasicR. NET Unleashed
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 222

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net