Developer .NET UPDATE October 3, 2003
The final preparations for deploying the custom ASP.NET starter Web site are under way. In this column, learn about the first step in packaging a site: packaging the application files.
October 9, 2003
Developer .NET UPDATE—brought to you by the Windows & .NET Magazine Network
http://www.winnetmag.com
This Issue Sponsored By
DevConnections--8 Days Left to Register
http://www.devconnections.com
SQL Server Magazine Connections--Win a Harley
http://www.sqlconnections.com
October 3, 2003--In this issue:
1. Developer .NET Perspectives
Using Visual Studio .NET to Package Application Files
2. Announcements
Get Problem-Solving Scripts That Will Simplify Your Life
Early Bird Discount--Register by October 15th!
3. Event
The Mobile & Wireless Road Show Is Coming to Tampa and Atlanta!
4. New and Improved
Accelerate Device-Driver Development
Tell Us About a Hot Product and Get a T-Shirt!
5. Contact Us
See this section for a list of ways to contact us.
Sponsor: DevConnections--8 Days Left to Register
DevConnections = Microsoft ASP.NET Connections + Visual Studio Connections + SQL Server Magazine Connections + Microsoft Office System Connections. Register early and you will receive all four conferences for the price of one. Choose from over 150 sessions. All session and speaker information and the conference brochures are online.
This is your chance to get the latest roadmap from Microsoft, learn practical tips and insights that you'll use on the job immediately, and network with the top gurus in the industry. Plus, you may win a brand new Harley Davidson motorcycle among other cool giveaways at the prize drawing held in the exhibit hall.
DevConnections is held Oct 12 - 15 in Palm Springs at the beautifulLa Quinta Resort and Club. Don't miss this opportunity to get the training you need to stay on top of today's technology and keep your competitive edge on the job.
Register today and you'll get:
4 Conferences for the Price of 1
Opportunity to win a Harley and other giveaways
Free one-year subscriptions to MSDN Magazine and Dr. Dobb's Journal
Register online or call 800-438-6720 or 203-268-3204.
http://www.devconnections.com
1. Developer .NET Perspectives
by Bill Sheldon, [email protected]
Using Visual Studio .NET to Package Application Files
This week I'm going to show you the final preparations for deploying your custom ASP.NET starter Web site. In the past few columns, I described the underlying implementation of the ASP.NET Community Starter Kit. The Community Starter Kit, one of the five sample ASP.NET implementations available from the Microsoft ASP.NET Web site (http://www.asp.net), was the starting point for creating a custom, real-world example of a Windows .NET Framework implementation. In this column, I show you the first step in packaging your site: packaging the application files. I'll save the second step--packaging the database--for the next column.
Many developers are unaware that Visual Studio .NET provides an excellent environment for creating simple Windows Installer (.msi) packages. Although specialized third-party tools (e.g., InstallShield Software's InstallShield DevStudio, Wise Solutions' Wise for Visual Studio .NET or Wise for Windows Installer) are available, Visual Studio .NET provides an integrated, easy-to-use interface that's already part of your development suite.
For most ASP.NET applications, the goal is to automate the collection of associated files for transfer to the Web server and ensure that the basic settings associated with the new virtual directory are correct. The result is a reliable tool that you can repeatedly use when you need to install your ASP.NET application on new or additional servers.
To package the application files for your custom ASP.NET, you first need to add a Web Setup Project to the solution you're using for your custom starter-kit implementation. To add a new setup project, select Add Project, New Project on the File menu in Visual Studio .NET. Select Setup and Deployment Projects to display the available setup-project templates. Each of the self-describing templates target a specific type of installation. For example, the Merge Modules template creates packages that you can include as part of full .msi packages, and the Setup Project template creates packages that install client applications. Because you want to create a package that installs an ASP.NET application, select the Web Setup Project template.
After you select the template, you need to provide a name. You might be tempted to include the word "setup" in the name. I recommend against using this word because, by default, Visual Studio .NET uses the Web Setup Project's name as the default name of the virtual directory associated with the application. Click OK to have Visual Studio .NET add the Web Setup Project to your solution.
Next, open the File System Editor. On the left side of the File System Editor, you'll see a placeholder for the Web Application Folder. To add the necessary project files to this folder, right-click the Web Application Folder and select Add, Project Output. In the Add Project Output Group dialog box, you need to select two types of output from the outputs list.
First, select Primary Output. Selecting this option prompts the installer package to automatically place the compiled code that's created as part of your custom starter-kit project in a subdirectory called bin in the Web Application Folder.
Next, hold down the Ctrl key and select Content Files from the outputs list. Selecting this option prompts the installer package to store in the Web Application Folder all the files that are referenced as content in the ASP.NET site. Thus, the installer package includes all the .aspx, .asmx, .ascx, .asax, and web.config files associated with your project, but not all the subdirectories associated with your project's classes.
Click OK to add these two types of output to the file system on the target machine. To verify that the primary output and content files will be included in the Web Application Folder, right-click each item and select Outputs. The Outputs dialog box displays the files that will be included.
From the Outputs dialog box, you can filter files that you don't want to include. For example, if you don't want to include the web.config file from your development environment, right-click "Content Files from CommunityStarterKit" and select ExcludeFilter. In the Filter dialog box, click Add Filter, enter "web.config", and click OK. Recheck the Outputs dialog box to make sure that the web.config file is no longer listed as an output.
At this point, your package is essentially ready to go. Optionally, you can modify the default virtual directory for your application by right-clicking the Web Application Folder, selecting Properties, then modifying the VirtualDirectory property that's in the Properties window. You can also modify the default security settings related to Microsoft IIS security and other IIS Metabase settings in the Web Setup Project's Properties window.
To finish packaging the application files, right-click the project entry in Solution Explorer and select build. Visual Studio .NET first compiles the Web Application Project to ensure that any new files are automatically added to the installer package. Then, Visual Studio .NET generates the .msi file associated with installing your Web application.
Creating a Windows Installer package for your Web applications is an excellent way to ensure that you have a simple repeatable means for creating your Web application. The result is that you can package your application, send that package to a staging server for final testing, then use the same package in your production environment, knowing that the initial settings are correct.
Using an installer package can also save resources in shared development environments. With installer packages, every developer doesn't need a copy of the project to build the installer package; only the official build machine needs a copy of that project in its solution file for your application. In addition, the installer package isn't rebuilt every time you ask to start your project for debugging; it rebuilds only when you explicitly ask the installer package to do so.
I've only touched the surface on how you can use Visual Studio .NET to create custom Windows Installer packages. For additional information about this topic, I suggest you start at the following URL in the Microsoft Developer Network (MSDN):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vbconthefilesystemeditor.asp
Sponsor: SQL Server Magazine Connections--Win a Harley
SQL Server Magazine Connections is running concurrently with Microsoft ASP.NET Connections, Visual Studio Connections, and Microsoft Office System Connections. Only 8 days left to secure your seat. Register now and get access to all 4 conferences for the price of 1 plus a chance to win a brand new Harley Davidson motorcycle, among other great prizes.
Learn first hand from top SQL experts like Brian Moran, Kimberly Tripp, Michael Hotek, Don Kiely, William Vaughn, and more. In-depth sessions for DBAs, Database Developers, and Data-Warehousing and Business Intelligence specialists.
SQL Server Magazine Connections delivers 100% pure technical content about real world solutions that you can use in your job immediately. To stay competitive, you need to invest your time to keep pace with the latest technology, tips, and tricks. Connections will give you the edge.
Register today and you'll get:
4 Conferences for the Price of 1
Opportunity to win a Harley and other giveaways
Free one-year subscriptions to SQL Server Magazine
Register online or call 800-899-5325 or 203-268-3204.
http://www.sqlconnections.com
2. Announcements
(brought to you by Windows & .NET Magazine and its partners)
Get Problem-Solving Scripts That Will Simplify Your Life
OK, so you're not a programmer. But if you read Windows Scripting Solutions every month, you don't need to be. Tackle common problems and automate everyday, time-consuming tasks with our simple tools, tricks, and scripts. Try a no-charge sample issue today!
http://www.winscriptingsolutions.com/rd.cfm?code=fsep26xxup
Early Bird Discount--Register by October 15th!
SQL Server Magazine and Holistech present the SQL Server High Availability Mini-Series. This online, four-part event begins on November 6 with topics that include: basic infrastructure, migrating hardware failure, preventing man-made failures, and planning for communication failure. Save $100 when you sign up today!
http://www.sqlmag.com/ssmu/training/index.cfm?event_id=62&pc=ep323aup
Hot Release: Thawte
Get Thawte's New Step-by-Step SSL Guide for MSIIS
In this guide you will find out how to test, purchase, install and use a Thawte Digital Certificate on your MSIIS web server. Throughout, best practices for set-up are highlighted to help you ensure efficient ongoing management of your encryption keys and digital certificates. Get your copy of this new guide now:
http://ad.doubleclick.net/clk;6247146;8447286;u
3. Event
(brought to you by Windows & .NET Magazine)
The Mobile & Wireless Road Show Is Coming to Tampa and Atlanta!
Learn more about the wireless and mobility solutions that are available today, plus discover how going wireless can offer low risk, proven performance, and compatibility with existing and emerging industry standards. Register now for this free, 12-city event!
http://www.winnetmag.com/roadshows/wireless
4. New and Improved
by Shauna Rumbaugh, [email protected]
Accelerate Device-Driver Development
Compuware released DriverStudio 3.0, a suite of driver development tools to help developers write, debug, test, and tune device-driver code that meets quality standards for Windows Hardware Quality Labs (WHQL) driver certification. The suite integrates with Microsoft Visual Studio .NET's IDE and Microsoft Visual Studio 6.0 through the product's DriverWorkbench technology and automates the development of drivers for Windows 2003/XP/2000/Me/NT. Components include DriverWorks, DriverNetworks, SoftICE, Visual SoftICE, BoundsChecker Driver Edition, TrueTime Driver Edition, and TrueCoverage Driver Edition. DriverStudio 3.0 supports the building of USB 2.0, AVStream, wireless IEEE 802.11b, connection-oriented network device interface specification (NDIS), and FireWire (IEEE 1394) drivers. Pricing is $2499. Contact Compuware at 800-521-9353 or on the Web.
http://www.compuware.com
Tell Us About a Hot Product and Get a T-Shirt!
Have you used a product that changed your IT experience by saving you time or easing your daily burden? Tell us about the product, and we'll send you a Windows & .NET Magazine T-shirt if we write about the product in a future Windows & .NET Magazine What's Hot column. Send your product suggestions with information about how the product has helped you to
Sponsored Links
CrossTec
Free Download - NEW NetOp 7.6 - faster, more secure, remote support
http://ad.doubleclick.net/clk;5930423;8214395;j?http://www.crossteccorp.com/tryit/w2k.html
Microsoft
Attend a Microsoft(R) Office System Launch Event – Get a FREE Eval Kit
http://ad.doubleclick.net/clk;6233617;8214395;l?http://click.atdmt.com/DDB/go/msg02800036ddb/direct/01/
5. Contact Us
About Developer .NET Perspectives -- [email protected]
About the newsletter -- [email protected]
About technical questions -- http://www.winnetmag.com/forums
About product news -- [email protected]
About your subscription -- [email protected]
About sponsoring UPDATE -- [email protected]
This email newsletter is brought to you by Windows & .NET Magazine, the leading publication for IT professionals deploying Windows and related technologies. Subscribe today.
http://www.winnetmag.com/sub.cfm?code=wswi201x1z
Copyright 2003, Penton Media, Inc.
About the Author
You May Also Like