Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Visual Web Developer™ 2005 Express Edition For Dummies - Alan Simpson

.pdf
Скачиваний:
23
Добавлен:
24.05.2014
Размер:
12.36 Mб
Скачать

330 Part IV: The Part of Tens

Appendix

Publishing Your Site

In This Appendix

Choosing a hosting provider

Preparing to upload

Uploading to the Web server

When all your site’s Web pages are working properly, you’re ready to upload your site to a hosting provider — a company that can host

your Web site in a way that allows anybody with an Internet connection to view your site.

When you’ve chosen a hosting provider, exactly how you upload pages to the site will depend on the provider you chose. There is no simple one-rule- fits-all technique that I can give you. Only your provider can give you specific details on what’s needed. But I can tell you, in general, what the process is all about.

Choosing a Hosting Provider

There are tons of companies out there who will be more than happy to host your Visual Web Developer Web site — for a fee, of course. (You may be able to get a few months free as a trial period, but that’s normally temporary.) The ASP.Net Web site (www.ASP.net) provides links to many companies that offer that service.

When you’re shopping for a hosting provider, you’ll come across a ton of options to choose from. Your goal is to find a service that specifically supports Visual Web Developer and SQL Server.

You’ll need a domain name, too. That domain name, preceded by http://www, becomes your site’s URL. For example, if you get the domain name Dunce School.com, then people will have to type www.DunceSchool.com into their browser’s Address bar to visit your site.

332 Visual Web Developer 2005 Express Edition For Dummies

You can set up your account and get a domain name at the same time. But there is no guarantee that the domain name you want is available. You might have to try several domain names before you find one that’s available. You can do so by going to any site that offers help with selecting domain names (such as www.NetworkSolutions.com).

After you have selected a domain name and a hosting provider, you’ll have the information needed to publish your site. For the sake of example, let’s say you set up an account with the following choices:

Domain Name: DunceSchool.com

UserName: YourUserName

Password: YourPassword

Don’t forget your own Web site’s domain name, username, and password. Print or jot down that information as soon as you get it. When you have a place to post your site, you also have two locations for the site:

Local: The copy of the site that’s on your computer, and has been since Day One.

Remote: The copy of the site on the Web server that the rest of the world can browse to.

To make your site visible to the world at large, you copy it from your local PC to the remote Web server. If you edit, refurbish, or otherwise tweak your site, the place to do that is your local PC. Then you can upload the revised version.

Preparing Your Site for Uploading

Once you have a place to upload your site, your ISP can fill you in on any specific tasks that have to be done prior to uploading. It’s a good bet you’ll want to turn off debugging and tracing in your site’s Web.config file before uploading (more about why in a moment). To do that, follow these steps:

1.Choose Website ASP.NET Configuration from the menu bar.

2.In the Web Site Administration Tool, click Application Configuration.

The options shown in Figure A-1 appear.

Appendix: Publishing Your Site 333

Figure A-1:

Application

Configura-

tion in the

Web Site

Administra-

tion Tool.

On a Web server, you generally don’t want debugging and tracing enabled because those things eat up resources. The drain is trivial and unimportant on your local PC, but on a Web server — where the system is likely to be much busier — the effect of that resource consumption is magnified greatly.

So before you upload, click the Configure debugging and tracing link. Then clear the Enable Debugging and Capture Tracing Information check boxes, as shown in Figure A-2.

Figure A-2:

Turning off debugging and tracing.

334 Visual Web Developer 2005 Express Edition For Dummies

Remember, I’m just showing you examples here, not specific instructions for your hosting provider. Only your hosting provider can give you specific instructions to configure your site for the services they provide.

If your site will send e-mail automatically, you also need to configure SMTP e-mail settings, using the link by that same name shown in Figure A-1). Again, only your hosting provider can tell you exactly how to configure your SMTP settings.

Copying the Site

After you have the above ducks all in a row, you’re ready to copy your site to the hosting provider’s server. You start by opening your Web site in Visual Web Developer, of course. Exactly how you do that will vary from one hosting provider to the next. But here are the general steps using FTP to upload pages:

1.Choose Web Site Copy Web Site from the menu bar.

2.Click the Connect button near the top of the page that opens.

3.In the left column, click FTP Site.

4.Type the FTP URL — exactly as provided by your ISP — into the Server box.

5.Deselect the Passive Mode and Anonymous Login check boxes.

6.Type your user name and password into the appropriate boxes, as shown in Figure A-3, and click Open.

Figure A-3:

Turn off debugging and tracing.

Appendix: Publishing Your Site 335

When you’re connected, the left pane shows your local site’s files; the right pane shows the remote site’s files. Initially, the remote site is empty. At this point, you simply want to copy all the files from your local site to the remote site. You can do so by clicking the button with the two-headed arrow between the two panes. Then you wait.

When all the files have been copied, the two columns will look the same, because the remote site contains all the same folders and files as the local site. To test the remote site, close Visual Web Developer. Then browse to the site’s URL, just as if you were any user who wanted to visit the site.

If there’s a problem with the remote site, chances are it’s something you have to fix at that end — using a Control Panel or something similar on the remote site to do that final tweaking. But exactly what final tweaking is required is (you guessed it) information you can get only from your service provider.

Given that your local site — the one that lives on your PC — is the best place to tweak, you may want to re-enable debugging and tracing in that site only. Now, because that change will be stored in the site’s Web.config file, you must remember not to upload that file to the remote site. In the Copy Files text box, the discrepancy between the local-site and remote-site Web.config files will show up as a pair of question marks, as shown in Figure A-4.

Figure A-4:

The local and remote Web.config files don’t match — but that may be okay.

Don’t presume that question marks mean “You must upload this file right now.” The question marks simply mean that the two files are different. But in this case, you may very well want the two Web.config files to be different because the sites are on two different computers, requiring two different configuration files. Any other changes you make to your site, however, should be uploaded to the remote site as needed. Those changes show up as a blue arrow.

336 Visual Web Developer 2005 Express Edition For Dummies

If you use the two-headed arrow box to copy all the pages from your local site to the remote computer in that case, you end up copying the local Web.config file too. To play it safe, select only the files you do want to copy, then click the right-pointing arrow button, as shown in Figure A-5, to copy just the modified pages without copying the modified Web.config file.

Figure A-5:

Copying just the selected files.

In a nutshell, that’s how uploading pages to a Web server works in Visual Web Developer Express. In the non-Express version of the product, you also have the option to publish the site. The main difference between the two processes is that when you publish, you must first create a set of executable files, and then copy those files to the server.

What’s on the CD-ROM?

This book includes two CD-ROMs. The first disc contains Visual Web Developer 2005 Express Edition software. The second disc contains sup-

plemental material for Visual Basic 2005 Express and Visual Web Developer 2005 Express. The full contents of this second disc are discussed in the sections that follow.

Visual Basic 2005 Express

Videos: Absolute Beginner’s Guide to Visual Basic Express

This video series is designed specifically for individuals who are interested in learning the basics of how to create applications using Visual Basic 2005 Express Edition. This includes over 8 hours of video-based instruction that walks from creating your first “Hello World” application to a fully functioning RSS Reader application. Learn how to write your first application today.

For more information on software development with Visual Basic Express Edition, you may be interested in these Supplemental Readings. (They require Adobe Acrobat Reader.)

Includes all 16 lessons with 17 videos and 12 downloads.

Starter Kits: Starter Kits are enhanced project templates that can be shared with other members of the community. Here are some starter kits for Visual Basic.

Card Game Starter Kit: This Starter Kit is a complete Black Jack card game. The starter kit contains an extensible framework for building card games and a Black Jack game application that is built on top of this framework. The project comes ready to compile and run, but it’s easy to customize with only a little extra programming. The section Expanding the Card Game contains a list of some customizations you might make. You are also free to use the source code as the basis for your own card game projects, and share your work with others or upload it to the Internet.

Amazon-Enabled Movie Collection Starter Kit (link): The AmazonEnabled Movie Collection Starter Kit is a Windows Form application that uses Amazon.com’s Web services to dynamically search for movie titles. This Starter Kit demonstrates technologies such as: calling XML Web services, databinding, application settings, local data storage using SQL Server 2005 Express Edition, and more.

338 Visual Web Developer 2005 Express Edition For Dummies

Additional Resources: Here are additional resources on the Web. Most of these links will be updated in the future, so you may want to occasionally check them for updated information and resources.

Visual Basic Express Edition Home Page: This page on the Microsoft Web site provides additional information and links for Visual Basic Express.

Visual Basic Developer Center: Visit the Microsoft Visual Basic Developer Center. Here you will find the most recent information on Visual Basic.

Visual Basic Forums: Read and place postings on the many ASP.NET forums.

SQL Server Query Basics: Learn to use the powerful T-SQL language and see how easy and flexible it is for retrieving information stored in SQL Server. This article introduces you to T-SQL and its robust query syntax that makes it easy for you to use SQL Server Express for your data-driven applications.

Visual Web Developer 2005 Express

Videos: Learn Visual Web Developer Series

This video series is designed specifically for individuals who are interested in learning the basics of how to create dynamic Web applications using ASP.NET 2.0 and Visual Web Developer 2005 Express Edition in either Visual Basic or C#.

Includes all 14 lessons with 14 videos and 14 downloads for Visual Basic Includes all 14 lessons with 14 videos and 14 downloads for C#

Videos: Videos by Jeff Prosise of Wintellect (Links to MS Web Site)

This series of video presentations by Jeff Prosise of Wintellect introduces you to many of the new features of ASP.NET 2.0, such as:

Web Forms: Web forms are the atoms from which ASP.NET Web pages are built. This module introduces the Web forms programming model and acquaints developers with some of the Web controls featured in ASP.NET.

State Management: ASP.NET 2.0 provides a variety of mechanisms for building stateful Web applications. This module introduces them all: view state, application cache, session state, profiles, and cookies.

What’s on the CD-ROM? 339

Security: Learn the essentials of ASP.NET security with an emphasis on forms authentication, the membership and role management services, and login controls.

Master Pages and Site Navigation: Get an introduction to master pages, which are templates that provide content to other pages, and to the data-driven site navigation tools featured in ASP.NET 2.0.

Data Access: New controls in ASP.NET 2.0 enable developers to build sophisticated, data-driven Web pages with little or no

code. This module introduces developers to data-driven content, ASP.NET-style.

Application Infrastructure: Pages alone do not a Web site make. This module introduces other essential elements of ASP.NET applications, including Web.config, Global.asax, components, and resources.

Starter Kits: The ASP.NET 2.0 Starter Kits for Visual Web Developer are fully functional sample applications to help you learn ASP.NET 2.0. Each sample is complete and well-documented so that you can use the code to kick start your Web projects today.

Club Site Starter Kit (link): This starter kit provides a starting point for creating a Web site for your club or organization. The kit includes news posting, calendaring, member directory, and photo album systems.

Time Tracker Starter Kit (link): This is a business Web application for keeping track of hours spent on a project, with the ability to handle multiple resources as well as multiple projects.

Additional Resources: Here are additional resources on the Web. Most of these links will be updated in the future, so you may want to occasionally check them for updated information and resources.

Visual Web Developer 2005 Express Edition Guided Tour: Learn about the key new features available in Visual Web Developer 2005 Express that will make Web development easier and more productive than ever before.

ASP.NET 2.0 QuickStart Tutorial: The ASP.NET QuickStart is a series of ASP.NET samples and supporting commentary designed to quickly acquaint you with the syntax, architecture, and power of the ASP.NET Web programming framework. The QuickStart samples are designed to be short, easy-to-understand illustrations of ASP.NET features. By the time you finish reading this tutorial, you will be familiar with the broad range of the new features in ASP.NET 2.0, as well as the features that were supported in earlier versions.

Соседние файлы в предмете Информатика