2. Creating, Opening, and Importing Sites

What Is a Site?

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

Expression Web is a capable 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 site.

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

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

How Expression Web Maintains a Site

By default, Expression Web tracks files and folders in your site, as well as other important information about the 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 site, as shown in Figure 2.1.

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

image

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


Note

image

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.


image “For more information on configuring your site settings, see Chapter 15, “Site Management and Reporting.”

Sites and Subsites

Expression Web enables you to create a new site within an existing site (a site known as a subsite), but for Expression Web to recognize the subsite, it needs to add metadata information to the site. If the option to store site information using hidden metadata is disabled, Expression Web will no longer be able to recognize the subsite as a separate site.

Site Templates

The quickest way to get a site up and running is to use the templates provided in Expression Web. You access the list of templates by selecting Site, New 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.

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

image


Note

image

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


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

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

image


Note

image

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


image For more information on Dynamic Web Templates, see Chapter 19, “Using Dynamic Web Templates.”

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 site is implemented using CSS, it’s 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.

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

image

image For more information on working with CSS in Expression Web, see Chapter 18, “Managing CSS Styles.”

Types of Sites

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

• Disk-based site

• FTP (File Transfer Protocol) site (or secure FTP using SFTP [FTPS])

• HTTP (Hypertext Transfer Protocol) site (or secure HTTP [HTTPS] with Secure Sockets Layer [SSL])

Disk-Based Sites

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


Tip

image

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


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

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

To create a disk-based site:

  1. Select Site, New Site.
  2. Enter the path for the new site, as shown in Figure 2.5, or click the Browse button to navigate to the desired location.

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

    image

  3. Select a general site or a site template from the dialog.
  4. Check the Add to Managed List check box if you want the new site to appear in your Managed Sites List.
  5. Click OK to create the site.

You can create a disk-based 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.


Caution

image

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

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


If a site is already open in Expression Web and you want to add a new site to the existing site check the Add to Current Site check box and Expression Web adds the new site to the existing site. This is a convenient way to add pages from one of the templates that come with Expression Web to an existing site.

If content already exists at the location you specify, Expression Web adds 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 site, you might want to stop Expression Web from saving additional files in your site. If you don’t want Expression Web metadata in the folder, select Site, Site Settings and uncheck the Maintain the Site Using Hidden Metadata Files check box in the Site Settings dialog, as shown in Figure 2.6. When you uncheck that box and click OK, you are asked whether you’re sure you want to remove the metadata, as shown in Figure 2.7. If you click Yes, all the _vti folders and metadata therein are removed.

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

image

Figure 2.7. When you choose to remove metadata files, Expression Web warns you that you’ll lose some functionality.

image


Tip

image

Because a site can be created anywhere on the file system, it’s easy to lose track of where a particular site was created. The Recent Sites menu option on the File menu is a convenient way to locate a recently created site. You can also use the Managed Sites List to easily keep track of your sites.


Expression Web can use the Microsoft Expression Development Server to test disk-based sites, allowing you to take full advantage of ASP.NET and PHP: Hypertext Preprocessor (PHP) features that require a web server.

image For more information on the Microsoft Expression Development Server, see Chapter 33, “Using the Microsoft Expression Development Server.”


Caution

image

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

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


FTP Sites

FTP sites are usually located on a remote web server. Most web hosts provide FTP access so you can use FTP with your site. Most applications require you to 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. Because FTP is offered by almost all hosts, it is a convenient way to work with sites using Expression Web. If you choose to use FTP with Expression Web, use SSH File Transfer Protocol (SFTP) or FTP over SSL (FTPS) if possible so that the information (such as usernames and passwords) is encrypted.


Caution

image

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


To open an FTP site, select Site, Open Site and enter the FTP path. When you click Open, Expression Web asks whether you want to open the site live or copy it to your local machine, as shown in Figure 2.8.

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

image


Tip

image

To use SFTP, use the format sftp://site.com. To use FTPS, use the format ftps://site.com. Your host or server administrator will need to configure a secure FTP connection to use one of these methods.



Caution

image

If you’re a notebook user with wireless capability, you probably use wireless Internet access in hotels when you travel. Be aware that many hotel networks are unsecure, 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 its wireless network, use a virtual private network (VPN) solution such as Hamachi 2 (https://secure.logmein.com/products/hamachi2/) or GoToMyPC (www.gotomypc.com) so you can securely access the network. You can also connect the hotel’s wired network (Ethernet cable) to a wireless access point such as Apple’s Airport Express to create your own secure wireless network.


image For a more in-depth discussion of FTP, see Chapter 14, “Publishing a Site.”

After you choose whether you want to edit the site live or copy it to your local machine, Expression Web prompts you for your username and password. If you want Expression Web to remember your password for the site, check the Remember My Password box, as shown in Figure 2.9.

Figure 2.9. Expression Web remembers your password for a site if you check the Remember My Password check box.

image

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

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

image

HTTP Sites

HTTP sites employ the same technology used when viewing your site in a web browser. 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. You can also use secure HTTP (HTTPS) so credentials are encrypted.

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

Figure 2.11. If your host has the FrontPage Server Extensions installed, you can open your site live using HTTP (or HTTPS if your server supports SSL) as shown here.

image

There’s one caveat to creating a site using HTTP. The web server on which you are creating the site must be running the FrontPage Server Extensions. Many hosting companies no longer offer support for FrontPage Server Extensions, so if having the capability of using HTTP to open your site is important to you, make sure that the hosting company you choose supports the FrontPage Server Extensions.

image For more information on the FrontPage Server Extensions, see Chapter 14, “Publishing a Site.”


Note

image

Expression Web can also use WebDAV to create HTTP sites, but I’ve yet to encounter a host that supports the use of WebDAV. If you are using Expression Web in a corporate environment, you may be able to use WebDAV instead of the FrontPage Server Extensions to create HTTP sites.


Creating an HTTP Site

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

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

image


Tip

image

Many Internet service providers provide custom pages when you attempt to access a site that doesn’t exist. If your Internet service provider includes this feature, you might see the dialog shown in Figure 2.15 if you try to create a site on a server that doesn’t exist.


image For more information on the FrontPage Server Extensions and WebDAV, see Chapter 14, “Publishing a Site.”

You cannot create a new site at the root of a web server (for example, at http://www.mysite.com). If you try to, Expression Web won’t even check to see whether a web server exists at that location. Instead, it will notify you that you need to create a subsite instead, as shown in Figure 2.13.

Figure 2.13. If you try to create a new site at the root of a web server, Expression Web immediately notifies you that you must create a subsite instead.

image


Tip

image

If you enter a URL that starts with “https://”, Expression Web automatically checks the Use Encrypted Connection (SSL) check box.



Note

image

SSL is a technology 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 appropriately.


If you enter an address for a new subsite and Expression Web cannot locate a web server at the URL you specify, you see the dialog shown in Figure 2.14. This dialog means that Expression Web attempted to contact the domain you specified (oiuoiu.com in the case of Figure 2.14) and did not find any such domain.

Figure 2.14. If there is no web server at the location you specify when creating a subsite, Expression Web notifies you.

image


Caution

image

Always remember that sites are copyrighted material. Current laws as of this writing automatically provide for a common-law copyright on any published site.

You can use the Import Site wizard to import any site you want, but it is illegal to use the content or the design of someone else’s site without their express written permission.


Finally, if you attempt to create a new subsite on an existing web server and either that server doesn’t have the FrontPage Server Extensions installed or there is a configuration problem with the FrontPage Server Extensions, you see the dialog shown in Figure 2.15. You also see this dialog in cases where there is a web server at the URL you specify but the web server is not available.

Figure 2.15. If the FrontPage Server Extensions are not installed, or if there is a problem with the FrontPage Server Extensions on the server you specify, you are notified of the problem.

image


Tip

image

Keep in mind that when you import a site, you aren’t necessarily moving the site from a remote location to your local machine. The act of importing a site is really just the process of copying the site from one location to another.


Creating a Site Using SSL

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

Figure 2.16. You can create a site using SSL by checking the Use Encrypted Connection (SSL) check box. Your server must be configured to accept SSL traffic.

image

When you check the Use Encrypted Connection (SSL) check box, Expression Web automatically changes 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) is encrypted.

Importing Sites with the Import Site Wizard

Expression Web’s Import Site wizard, which consists of three primary steps, is a convenient and powerful way to import site content. Using the Import Site wizard, you can easily control how a site is imported. You can choose whether to use the FrontPage Server Extensions, FTP, and so on, and in some cases, you can also specify how Expression Web decides whether to import certain files.

The Import Site wizard is accessed by selecting Site, Import, Import Site Wizard. Let’s have a look at the steps involved in importing a site.

Choosing an Import Method

First, you need to choose how the site’s files are imported. You can choose among the following methods of importing a site:

FTP

• SFTP

• FTPS

• FrontPage Server Extensions

• WebDAV

• File system

• HTTP


Caution

image

If the remote web server has the FrontPage Server Extensions installed, make sure you use this option when importing the site. If you don’t, the files that provide the FrontPage Server Extensions with configuration information won’t be imported.


All these methods except the FrontPage Server Extensions method use the Publish feature of Expression Web to import the remote site. After you’ve specified the necessary information for Expression Web to open the remote site, the remote site is published to the destination you’ve selected.

image For more information on using the Publish feature in Expression Web, see Chapter 14, “Publishing a Site.”

FTP, SFTP, and FTPS

To use the FTP to import a site, choose the FTP option. You need a username and password to import a site using FTP.


Tip

image

Most hosting companies do not support WebDAV publishing at this time.


To import a site using FTP, enter the FTP address of the remote site in the Web Site Location text box, as shown in Figure 2.17. Depending on the configuration of the remote site, you might also need to enter a directory in the Directory text box, and enable passive FTP by checking the Use Passive FTP check box. You can also increase the number of simultaneous connections from the default of 4 up to a maximum of 10. Doing so improves the speed at which the site is imported. However, there is a limit to the total number of connections your computer can have open at any one time, so increasing the connections in Expression Web can impact other applications.

Figure 2.17. Importing using FTP might require a directory and passive FTP. Ask the administrator of the remote site if you’re not sure.

image

If you want to import the site using secure FTP, choose either the SFTP or FTPS option when importing.

image For more information on the options available with FTP, see Chapter 14, “Publishing a Site.”


Note

image

The file system method is often used in an office network environment where many file servers are available.


After you’ve entered the necessary information, click the Next button to continue. You are prompted for a username and password before you can proceed to the next step.

FrontPage Server Extensions

If the remote site is running FrontPage Server Extensions, the FrontPage Server Extensions option should be used instead of the HTTP option. If you use the HTTP option, Expression Web will import files by following links in the site just as though you were viewing the site in a browser. However, if you use the FrontPage Server Extensions option, Expression Web opens the remote site and publishes the remote files to your local machine. This ensures that you get all of the files from the remote site.

After selecting this method, enter the URL of the remote site in the Location text box shown in Figure 2.18. Use the same URL that you would use when viewing the site in a web browser.

Figure 2.18. The FrontPage Server Extensions method of importing a site allows you to import subsites as well.

image

You have the option of including subsites by checking the Include Subsites check box. You can also import a site using the Secure Sockets Layer (SSL).

image For more information on subsites, see “Sites and Subsites,” p. 27, earlier in this chapter.


Tip

image

When you see the dialog shown in Figure 2.19, you should first check to see whether the FrontPage Server Extensions are installed on the remote site. If you find that they are installed and you still get this dialog, check with your host to find out what might be wrong.


Figure 2.19. If the FrontPage Server Extensions aren’t installed, Expression Web tells you that the selected site cannot be imported.

image

To proceed to the next step, click the Next button. If the FrontPage Server Extensions are not installed on the remote site, you are notified that you cannot import the site, as shown in Figure 2.19.

Assuming the FrontPage Server Extensions are located on the site, you are prompted for a username and password to import the site. The username and password you need to enter are assigned by the administrator of the site or by the hosting company.

WebDAV

If the remote web server supports Web Distributed Authoring and Versioning (WebDAV), you can use this option to import a site. WebDAV is similar to using the FrontPage Server Extensions option, but the FrontPage Server Extensions are not required for WebDAV.

When using WebDAV, you don’t have the option of including subsites when you import a site. However, you can import using SSL when using the WebDAV method by checking the Use Encrypted Connection (SSL) check box. If you want to import a subsite’s content, you need to specify the path to the subsite instead of the path to the parent site.

Just as with the FrontPage Server Extensions method, you need to enter a username and password when importing a site using WebDAV.

image For more information on WebDAV, see Chapter 14, “Publishing a Site.”

File System

The file system method is often used when importing a site from a local file system. However, it can also be used to import a site from any location to which you have access via the file system. In other words, in addition to importing from a local drive, you can also use either a universal naming convention (UNC) path or a mapped drive to import using this method.

A UNC path consists of a server name and a share name and is in the format \servershare. For example, to access a share called sites on a server named server1, you would use the UNC path \server1sites.


Tip

image

Windows automatically sets up a share for the root of every drive on your computer. You can access any share by using the format \server<drive>$. For example, to access the root of the C drive on a computer named desktop, you would use the UNC path \desktopc$.

You need to use an Administrator account to access these shares.


Because Expression Web provides support for disk-based sites, you can also choose to include subsites when using the file system method by checking the Include Subsites check box.

HTTP

The HTTP method is used to import a site to which you don’t have access via any of the previously discussed methods. This is the only method that does not require authorization to complete the import process.


Note

image

The Set Import Limits step actually appears as the third step in the wizard. I am covering it here only because it’s unique to the HTTP method of importing.


The HTTP import process is different from the other import methods. In fact, you can import any site you can get to on the Internet using this method. Instead of actually publishing the site during the import process, the HTTP import method can be configured to follow hyperlinks from the home page.


Tip

image

By default, Expression Web imports all files that are reachable from the home page and all child pages.


When you choose the HTTP method to import a site, the Import Site wizard adds the Set Import Limits step, as shown in Figure 2.20.

Figure 2.20. The HTTP method of importing a site adds another step to the Import Site wizard.

image

In this step, you can specify exactly how the Import Site wizard decides what to import using the following check boxes:

Import the Home Page Plus Linked Pages # Levels Deep— When a site is imported, Expression Web follows hyperlinks to the depth that you specify. For example, if you specify 2 for the number of levels, Expression Web imports the home page, all pages linked to directly from the home page, and all pages linked to directly from those pages.

Import a Maximum of # KB— Use this option when you want to put a cap on the amount of content that gets imported. This is particularly useful if you have metered bandwidth or a slower Internet connection.

When this option is selected, Expression Web imports the home page of the site and then follows all links from that page. It continues to follow links and import files until the maximum limit is reached.

Import Only HTML and Image Files— When this box is checked, Expression Web imports only images and HTML files. Other files such as script files, CSS files, Flash files, and so on are not imported.

Specifying a Destination Web Location

The second step of the Import Site wizard (shown in Figure 2.21) is where you specify the destination location for the imported site. This can be a UNC path, a disk location, or an HTTP location. However, when specifying an HTTP location, the site must have the FrontPage Server Extensions installed.

Figure 2.21. You can specify a destination for an imported site in the Import Site wizard.

image

If you already have a site open in Expression Web, check the Add to Current Web Site check box if you want the imported site to be added to the open site. If you require additional security, you can specify that SSL be used to import the site if you use an HTTP path for the destination.

Finishing the Site Import Process

After you’ve specified all the necessary information, click the Finish button in the last step of the wizard to finish the import process. If you’ve chosen HTTP as your method of importing, the site begins importing immediately. Otherwise, you are presented with the Site view, as shown in Figure 2.22. You can then complete the import process by publishing your site using the Site view to copy the files and folders.

Figure 2.22. In all import methods except the HTTP method, you use the Site view to complete the import process.

image

image For more information on Site view to publish a site, see Chapter 14, “Publishing a Site.”

Deciding on a Site Type

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

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

Expression Web (and the Visual Studio 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 (preferably FTPS or SFTP) is the best solution for today’s sites. 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 sites, FTP will be around for many years to come.

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

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
3.148.117.212