Chapter 2. Creating a Web Site

<feature><title>In this chapter</title> </feature>

What Is a Web Site?

At first glance, that may seem like a patronizing question, but it’s not. I’m not talking about a Web site in the generic sense. I’m talking about a Web site as it relates to Expression Web.

Expression Web is a capable Web page editor, but it’s really designed to work with a collection of related files. That collection of related files is what Expression Web refers to as a Web site.

Expression Web has many features that are designed with a Web site in mind. The reporting features of Expression Web, for example, are designed to provide information on an entire Web site. There are also numerous dialogs that allow you to take a specific action on all files in a Web site, and the Find and Replace feature in Expression Web is most robust when used with a Web site and not just a single Web page.

A Web site can consist of Web pages, Cascading Style Sheets (CSS) files, script files, image files, and so on. It can also contain other folders for the purpose of organizing the files within the site.

How Expression Web Maintains a Web Site

By default, Expression Web tracks files and folders in your Web site as well as other important information about the Web site using hidden files called metadata. These files are in hidden folders that begin with _vti and are located in the same folder as the rest of your Web site, as shown in Figure 2.1.

The _vti folders shown here contain special configuration information that Expression Web uses to keep track of your Web site.

Figure 2.1. The _vti folders shown here contain special configuration information that Expression Web uses to keep track of your Web site.

Note

The _vti folders shown here contain special configuration information that Expression Web uses to keep track of your Web site.

If you can’t see the _vti folders, see “Don’t See _vti Folders” in the “Troubleshooting” section of this chapter.

Note

The _vti folders are not visible in Expression Web’s folder list. Expression Web explicitly hides those folders from view so you don’t unintentionally modify them.

If you choose, you can configure Expression Web so it doesn’t use metadata to track your Web site’s files. However, it’s best to just allow Expression Web to keep metadata for your Web site. Doing so allows it to efficiently track changes to your Web site. However, if you choose not to use them, the functionality of the live Web site will not be affected.

For more information on configuring your Web site settings, see “Web Site Management and Reporting”, p. 67 (Chapter 4).

Web Sites and Subsites

Those of you who have used Microsoft FrontPage will no doubt be familiar with the concept of subsites. In FrontPage, it was possible to create a Web site within a Web site called a subsite. The subsite was treated as a separate Web site. For example, if you linked a style sheet to all files in the current Web site, files within the subsite would not be affected.

For more information on style sheets and linking them to Web pages, see “Managing CSS Styles”, p. 311 (Chapter 18).

Expression Web allows you to create new Web sites within an existing Web site, but it does not understand the concept of a subsite. For example, if you create a new Web site within your current Web site, Expression Web will display the new Web site as a regular folder within the existing Web site. Any actions performed against all files in the Web site will affect the files in the existing Web site, including those in the newly created Web site. In other words, a Web site in Expression Web consists of all files in the directory structure regardless of how they got there or in what sequence they were created.

Web Site Templates

The quickest way to get a Web site up and running is to use the templates provided in Expression Web. You access the list of templates by choosing New, Web Site, and selecting Templates in the New dialog as shown in Figure 2.2. These aren’t cheap-looking, stock templates. They are professionally designed templates that are customizable.

Expression Web comes with professionally designed, customizable templates so you can get a fully functional Web site up and running quickly.

Figure 2.2. Expression Web comes with professionally designed, customizable templates so you can get a fully functional Web site up and running quickly.

Note

You don’t have to use a template to create a Web site. You can use the One Page Web Site option in the New dialog to create a Web site with one blank page, or you can create an empty Web site.

An empty Web site is a convenient way to create a Web site from a folder of existing files. When you choose the Empty Web Site option, Expression Web will not add any files or folders to the location you specify.

The Web site in Figure 2.3 was created using one of Expression Web’s many Web site templates. The Web site uses a Dynamic Web Template so that changes can be made quickly if necessary.

Dynamic Web Templates allow you to make changes to a templated Web site by just updating the Dynamic Web Template.

Figure 2.3. Dynamic Web Templates allow you to make changes to a templated Web site by just updating the Dynamic Web Template.

For more information on Dynamic Web Templates, see “Using Dynamic Web Templates”, p. 363 (Chapter 21).

The templates in Expression Web make heavy use of external style sheets, as shown in Figure 2.4. Because the look and feel of a Web site is implemented using CSS, it’s quite simple to use the robust CSS features in Expression Web to alter the look and feel of all pages in a site without much effort.

The look and feel of this Web site is implemented using several CSS files, making it easy to modify.

Figure 2.4. The look and feel of this Web site is implemented using several CSS files, making it easy to modify.

For more information on working with CSS in Expression Web, see “Managing CSS Styles”, p. 311 (Chapter 18).

Types of Web Sites

When starting work on a Web site, you’ll need to decide which type of Web site to create. There are three types of Web sites to choose from:

  • Disk-based Web site

  • FTP (File Transfer Protocol) Web site

  • HTTP (Hyper-Text Transfer Protocol) Web site (or secure HTTP (HTTPS) with Secure Sockets Layer (SSL))

Disk-based Web Sites

Disk-based Web sites are created at a specific disk location. The advantage to a disk-based Web site is that it can be created anywhere on your local file system or on a remote drive. You can also create disk-based Web sites on thumb drives, external hard drives, and so on.

Figure 2.5 shows the folder list of a disk-based Web site open in Expression Web. Note that the path to the Web site is a disk location on my C drive.

A disk-based Web site is created at a disk location. It can be a local drive, a removable drive, or a remote disk location.

Figure 2.5. A disk-based Web site is created at a disk location. It can be a local drive, a removable drive, or a remote disk location.

A disk-based Web site is the most flexible kind of Web site because it allows the Web site to be located in any folder you wish. For example, if you receive files for a Web site from someone else, you can work with them as a Web site in Expression Web easily by simply copying the files into a folder on your computer and opening that folder as a Web site.

Creating a Disk-Based Web Site

To create a disk-based Web site:

  1. Select File, New, Web Site.

  2. Enter the path for the new Web site, as shown in Figure 2.6, or click the Browse button to navigate to the desired location.

    To create a disk-based Web site, enter a disk path in the New dialog.

    Figure 2.6. To create a disk-based Web site, enter a disk path in the New dialog.

  3. Select the type of Web site you want to create.

  4. Click OK to create the Web site.

Tip

If you tell Expression Web to create a Web site in a folder that doesn’t exist, the folder will be created for you automatically. There is no prompt when this happens.

You can create a disk-based Web site on a mapped drive or on a universal naming convention (UNC) share (\servershare) as well. However, you’ll need to have the correct permissions so you can write to the remote location. Check with your system administrator if you’re not sure.

If a Web site is already open in Expression Web and you’d like to add a new Web site to the existing site, check the Add to Current Web Site box. Expression Web will then add the new Web site to the existing Web site. This is a convenient way to add pages from a template to an existing Web site.

If content already exists at the location you specify, Expression Web will add its metadata to the existing folders. If you’re not using Dynamic Web Templates or if you don’t want Expression Web to maintain links in your Web site, you may want to stop Expression Web from saving additional files in your Web site. If you don’t want Expression Web metadata in the folder, you can select Site, Site Settings and uncheck the Manage The Web Site Using Hidden Metadata Files checkbox in the Site Settings dialog, as shown in Figure 2.7. When you uncheck that box and click OK, you’ll be asked if you’re sure you want to remove the metadata, as shown in Figure 2.8. If you click Yes, all the _vti folders and metadata therein will be removed.

To get rid of the _vti folders and the metadata they contain, uncheck the option to store Web site information in metadata files in the Site Settings dialog.

Figure 2.7. To get rid of the _vti folders and the metadata they contain, uncheck the option to store Web site information in metadata files in the Site Settings dialog.

When you choose to remove metadata files, Expression Web will warn you that you’ll lose some functionality.

Figure 2.8. When you choose to remove metadata files, Expression Web will warn you that you’ll lose some functionality.

Caution

If you’re using Dynamic Web Templates in your Web site, you will need to allow Expression Web to store metadata files in your Web site. You will also want to leave metadata enabled if you want Expression Web to correct links as pages are moved or renamed.

Caution

Don’t ignore the warning about removing metadata! Some of the information in the Web site’s metadata will be lost permanently if you choose to remove the metadata.

Tip

Because a Web site can be created anywhere on the file system, it’s easy to lose track of where a particular Web site was created. The Recent Sites menu option on the File menu is a convenient way to locate a recently created Web site.

Caution

You can delete a Web site by right-clicking the site name in the Folder List and selecting Delete. However, be careful about deleting Web sites you’ve created on your file system. If you create a Web site in a location with existing files and folders and then delete that Web site, Expression Web will delete everything in that folder.

Files and folders deleted by Expression Web are not moved to the Recycle Bin. They’re gone forever!

Expression Web can use the ASP.NET Development Server to test disk-based Web sites, allowing you to take full advantage of ASP.NET features that require a Web server.

For more information on the ASP.NET Development Server, see “Using the ASP.NET Development Server”, p. 485 (Chapter 27).

FTP Web Sites

FTP Web sites are usually located on a remote Web server. Most Web hosts provide FTP access so you can use FTP with your Web site. Most applications require that you develop a site locally and then FTP the files to the remote Web server. Expression Web takes a different approach in that it offers you the ability to work on an FTP site live on the Web server.

To open an FTP Web site, select File, Open Site and enter the FTP path. When you click Open, Expression Web will ask you if you want to open the Web site live or copy it down to your local machine as shown in Figure 2.9.

Expression Web offers the option of opening an FTP site live on the Web server.

Figure 2.9. Expression Web offers the option of opening an FTP site live on the Web server.

For a more in-depth discussion of FTP, see “Publishing a Web Site”, p. 41 (Chapter 3).

Caution

If you choose to work on your Web site live using FTP, keep in mind that any changes you make are immediately visible on the live Web site after you save the page.

Because FTP is offered by almost all hosts, it is a convenient way to create Web sites using Expression Web. However, FTP is usually not a secure method of accessing your Web site. When you enter your username and password for your FTP site, as shown in Figure 2.10, it is sent in clear text over the Internet, making it quite easy for someone to grab your username and password.

When you create a Web site using FTP, you’ll need to enter your username and password. Be careful, because what you enter is sent in the clear over the Internet.

Figure 2.10. When you create a Web site using FTP, you’ll need to enter your username and password. Be careful, because what you enter is sent in the clear over the Internet.

Caution

If you’re a notebook user with wireless capability, you probably use wireless Internet access in hotels when you travel. Be aware that most hotel networks are unsecured and anything you transmit and receive over the wireless network can be intercepted by anyone else in the hotel using the wireless network.

When you are in a hotel and need to use their wireless network, use a Virtual Private Network (VPN) solution such as Hamachi (www.hamachi.cc) so you can securely access the network.

Creating an FTP Web Site

To create an FTP Web site, enter the FTP path to your Web server in the New dialog as shown in Figure 2.11. You will likely be prompted for a username and password as shown in Figure 2.12.

When creating a Web site using FTP, enter the FTP location. If you don’t know the correct location, your Web server administrator can help.

Figure 2.11. When creating a Web site using FTP, enter the FTP location. If you don’t know the correct location, your Web server administrator can help.

You will likely be prompted for a username and password when using FTP. Your Web server administrator can provide them if you don’t know them.

Figure 2.12. You will likely be prompted for a username and password when using FTP. Your Web server administrator can provide them if you don’t know them.

Note

You will likely be prompted for a username and password when using FTP. Your Web server administrator can provide them if you don’t know them.

If you get an error message when creating a Web site using FTP that says Expression Web is unable to locate a server on Port 21, see “Cannot Locate Server Error Creating FTP Site” in the “Troubleshooting” section of this chapter.

Note

You will likely be prompted for a username and password when using FTP. Your Web server administrator can provide them if you don’t know them.

If you are repeatedly prompted for a username and password when creating a Web site using FTP, see “Repeatedly Prompted for Username and Password” in the “Troubleshooting” section of this chapter.

For information on how to configure Expression Web to save files to FTP servers, see “Creating Pages and Content”, p. 103 (Chapter 7).

HTTP Web Sites

HTTP Web sites employ the same technology that is used when browsing your Web site. This method offers a greater selection of authentication methods for the Web server administrator. In a private network environment, Windows-integrated authentication can be used so that user credentials are securely exchanged. In addition, SSL can be used on a remote Web server so credentials are encrypted.

Figure 2.13 shows the Folder List of an HTTP Web site open in Expression Web. Notice that the address of the Web site in Expression Web is the same address that would be used to browse this Web site in a Web browser.

If your host has the FrontPage Server Extensions installed, you can open your Web site live using HTTP as shown here.

Figure 2.13. If your host has the FrontPage Server Extensions installed, you can open your Web site live using HTTP as shown here.

There’s one caveat to creating a Web site using HTTP. The Web server on which you are creating the site must be running the FrontPage Server Extensions.

For a more in-depth discussion of the FrontPage Server Extensions, see “Publishing a Web Site”, p. 41 (Chapter 3).

Creating an HTTP Web Site

To create an HTTP Web site, enter the URL for the Web site in the New dialog as shown in Figure 2.14. If necessary, enter your username and password.

When creating a Web site using HTTP, use the same uniform resource locator (URL) that you would use to browse the Web site in your Web browser.

Figure 2.14. When creating a Web site using HTTP, use the same uniform resource locator (URL) that you would use to browse the Web site in your Web browser.

For more information on the FrontPage Server Extensions and WebDAV, see “Publishing a Web Site”, p. 41 (Chapter 3).

Note

When creating a Web site using HTTP, use the same uniform resource locator (URL) that you would use to browse the Web site in your Web browser.

If you are continually prompted for a username and password when creating a Web site using HTTP, see “Repeatedly Prompted for Username and Password” in the “Troubleshooting” section of this chapter.

If Expression Web doesn’t find a Web server at the location you specify, it will respond with a dialog telling you that you cannot create a site at that location, as shown in Figure 2.15. Strangely enough, that same dialog will recommend that you try creating a subsite. However, if there truly isn’t a Web server at the URL, any attempt to create anything will be met with a dialog informing you that no such server exists, as shown in Figure 2.16.

If there is a problem creating a site at the URL you specify, Expression Web will recommend that you try creating a subsite.

Figure 2.15. If there is a problem creating a site at the URL you specify, Expression Web will recommend that you try creating a subsite.

If there is no Web server at the location you specify when creating a subsite, Expression Web will notify you.

Figure 2.16. If there is no Web server at the location you specify when creating a subsite, Expression Web will notify you.

If you attempt to create a subsite on an existing server that does not either have the FrontPage Server Extensions installed or support creating Web sites via WebDAV, Expression Web will notify you with the dialog shown in Figure 2.17.

If Expression Web cannot create a site on an existing Web server, you’ll be met with a dialog informing you of possible causes for the failure.

Figure 2.17. If Expression Web cannot create a site on an existing Web server, you’ll be met with a dialog informing you of possible causes for the failure.

Creating a Site Using SSL

If you require additional security and your server is configured to allow SSL traffic, you can create a Web site using SSL by checking the Use Encrypted Connection (SSL) checkbox, as shown in Figure 2.18.

You can create a Web site using SSL by checking the Use Encrypted Connection (SSL) checkbox. Your server must be configured to allow HTTPS traffic.

Figure 2.18. You can create a Web site using SSL by checking the Use Encrypted Connection (SSL) checkbox. Your server must be configured to allow HTTPS traffic.

When you check the Use Encrypted Connection (SSL) checkbox, Expression Web will automatically change the URL you have specified if necessary so it uses HTTPS instead of HTTP. When this option is selected, any data sent over the network (including your username and password) will be encrypted.

Note

SSL is a technology that was developed by Netscape many years ago to allow for the secure exchange of information across the Internet.

To use SSL, your Web server administrator needs to configure the Web server appro-priately.

Troubleshooting

Don’t See _vti Folders

I have Expression Web configured to use metadata files to keep track of my content, but when I open the disk path where my site is located, I don’t see any _vti folders.

The _vti folders are hidden. The default settings in Windows won’t show you hidden folders. To show hidden files and folders, follow these steps for Windows Vista:

  1. Click Start and click Computer.

  2. Click the Organize button and select Folder and Search Options.

  3. Click the View tab.

  4. Select the Show Hidden Files And Folders radio button and click OK.

In Windows XP or Windows 2003 Server:

  1. Click Start and click My Computer.

  2. Select Tools, Folder Options.

  3. Click the View tab.

  4. Select the Show Hidden Files And Folders radio button and click OK.

You should now be able to see the _vti folders.

Cannot Locate Server Error Creating FTP Site

I’m trying to create a site at an FTP location. When I click OK to create the site, Expression Web tells me it can’t find a server on Port 21.

If Expression Web cannot locate an FTP site, it’s likely that you mistyped it. However, there are other reasons that this might fail as well.

Try opening a command prompt and pinging the FTP site. For example, the following command will test for the existence of an FTP server at jimcosoftware.com:

ping ftp.jimcosoftware.com

If you get no reply from the ping, it means you aren’t getting to the server. Check your Internet connection by browsing to a known Web site. If that works and you still can’t access the FTP site, check with the server administrator or your hosting company.

Repeatedly Prompted for Username and Password

I’m trying to create a Web site on a remote server. When I enter my username and password, the dialog asking for my credentials just keeps popping back up.

This is almost certainly caused by a typographical error in the username and/or password. Assuming you aren’t mistakenly entering the wrong case due to your Caps Lock key being engaged, carefully retype your username and password. If the server still won’t accept them, try contacting your hosting company or server administrator.

Lagniappe (lan yap’) n., a gift or bonus: Deciding on a Web Site Type

As you’ve seen in this chapter, there are quite a few choices when it comes to deciding on a Web site type. Deciding which type is best for your Web site is often a confusing endeavor.

Until recently, Webs using the Microsoft platform were limited in their choice of Web site types when it came to remote Web sites. If you wanted full functionality, you were restricted to using the FrontPage Server Extensions. Sure, you could use FTP if you desired, but then you couldn’t work with a remote site live if you did.

Expression Web (and the Visual Studio 2005 family of products) has changed all of that, and there’s a general tendency by Microsoft these days to shift away from a reliance on the FrontPage Server Extensions. You can now use FTP just as easily as you used HTTP in earlier products.

In my opinion, FTP is the best solution for today’s Web sites, unless you have a requirement for SSL. FTP is well-suited to fast file transfers, you have the ability to use many tools other than Expression Web to manage your files (including the FTP command-line client that comes with Windows), and unlike the FrontPage Server Extensions option used when creating HTTP Web sites, FTP will be around for many years to come.

Disk-based Web sites are also a perfectly valid option, especially if you are creating your Web site locally and then publishing it to the live server at a later time. One of the greatest advantages of a disk-based Web site is that it can easily be moved from one location to another (or stored on a removable drive) without breaking anything. However, if you are using a server technology such as ASP or PHP, a disk-based Web site is not a good choice because you will be unable to test your server-side code.

Note

ASP.NET can be tested in a disk-based Web site using the ASP.NET Development Server. For more information on the ASP.NET Development Server, see “Using the ASP.NET Development Server,” Chapter 27.

If given the choice between using a technology that’s being phased out and one that has proven to be a long-lived technology, I’ll choose the one with greater longevity every time.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset