Home > Articles

Publishing a Web Site

This chapter is from the book

Publishing Content

Now that you have a rundown of all the methods available when publishing a Web site in Expression Web, let's look at how to publish content to a Web site.

Configuring Publish Options

After you've opened the Web site you want to publish, select File, Publish Site to display the Remote Web Site Properties dialog. You'll then need to select the method you'll use for publishing and enter the location for the remote Web site.

If you'd like to review or change the options for publishing your Web site, click the Publishing tab. As shown in Figure 3.4, you can choose to publish only those files that have changed since the last publish or you can choose to publish all files.

Figure 3.4

Figure 3.4 Expression Web lets you choose whether to publish everything or just those files that have changed since the last time you published.

By default, Expression Web publishes only those pages that have changed since the last time you published. It uses one of two methods to determine which files need to be published.

  • Determine changes by comparing source and destination sites—By default, Expression Web stores information on all the files in your Web site. If you choose this option, Expression Web will use that information to determine what files need to be published.
  • Use source file timestamps to determine changes since last publish—This method simply uses the timestamp on the files to determine what should be published. This method may not be as reliable as the first option.

Expression Web also gives you the option of whether or not to include subsites. Even though Expression Web will display subsites in the folder list of your Web site, it will only publish the main site by default. If you want to publish the main site and all the subsites, you'll need to check the Include Subsites checkbox.

For more information on subsites, see "Web Sites and Subsites", p. 27 (Chapter 2).

If you'd like Expression Web to create a log of your publish operation, check the Log Changes During Publish checkbox. Expression Web will then create an HTML file in your Temporary Internet Files folder, as shown in Figure 3.5. You can view this file by clicking View Your Publish Log File in the Copy Web Site view after you have published the Web site.

Figure 3.5

Figure 3.5 The Expression Web publish log is easy to filter using the Show Only dropdown. If you'd like to keep the log, save it after publishing the site.

Optimizing HTML during Publishing

In addition to publishing your files, Expression Web can also optimize your HTML. The main purpose of this feature is to remove code that may not be needed on the remote Web server.

You can configure what type of HTML optimization takes place using the Optimize HTML tab on the Remote Web Site Properties dialog, as shown in Figure 3.6.

Figure 3.6

Figure 3.6 Expression Web can remove any unnecessary code so that your pages are as small as possible for better load times, but don't expect miraculous increases in speed with this feature.

There are many options available for HTML optimization.

  • All HTML comments—Removes all HTML comments in code. HTML comments are designated by the <!— and <//—> characters. The closing comment character may also simply be —>.
  • Dynamic Web Template comments—Expression Web adds comments to pages that use Dynamic Web Templates so that editable regions can be identified. This option removes those comments.
  • Layout Tables and Cell Formatting comments—Expression Web adds comments to layout tables and cells. This option removes those comments.
  • Script comments—This option removes comments added to client-side scripts.
  • All other HTML comments—This option removes comments that are not covered in any of the previous categories.
  • HTML leading whitespace—Removes the leading whitespace from your lines of code.
  • HTML all whitespace—Removes all HTML whitespace, including whitespace between lines.
  • Web Designer Tracing Image and Interactive Button attributes—Removes attributes that are added for the purpose of tracing images and also removes interactive button attributes. These attributes are used only for editing purposes, so they aren't needed on live files.
  • Generator and ProgID tags—Removes the Generator and ProgID Meta tags that are added by Expression Web.

The Copy Web Site View

After you've configured all the publishing options for your Web site, click the OK button. If the remote Web site that you specify doesn't exist, Expression Web will prompt you to create it, as shown in Figure 3.7. Expression Web will create a Web site with an images folder and a _private folder. No other files or folders are created in the remote Web site until you publish files to it.

Figure 3.7

Figure 3.7 Expression Web prompts you to create a new Web site if the remote Web site you specify doesn't exist.

After the remote Web site has been created, the Copy Web Site view is activated, showing the local Web site on the left and the remote Web site on the right. From the Copy Web Site view, you can choose from one of three different publish settings:

  • Local to remote—File are copied from the local Web site on the left to the remote Web site on the right.
  • Remote to local—Files are copied from the remote Web site on the right to the local Web site on the left.
  • Synchronize—Changed files are synchronized between the two sites. This option is only enabled when the Changed Pages Only option is enabled in the Remote Web Site Properties dialog.

Expression Web displays an icon next to pages in the Copy Web Site view to indicate what will happen when the Web site is published, as shown in Figure 3.8. These icons are not displayed for folders, but if you select a folder, Expression Web will display the files within the folder along with appropriate icons indicating whether or not the files will be published.

Figure 3.8

Figure 3.8 Expression Web displays arrows next to files that will be copied when the Web site is published. The direction of an arrow indicates the direction of the file copy that will take place on that particular file.

Because I have chosen the option to synchronize the Web sites, Figure 3.8 indicates that default.htm will be copied to the remote Web site and master.dwt will be copied to the local Web site when the site is published.

You can also use the arrow buttons that appear between the local Web site and remote Web site views to publish files and/or folders. If you'd like to just copy a few files (or just one), you can simply drag and drop them between the two views.

If your Web site consists of just a few files, it's pretty easy to tell which files will be published using the Copy Web Site view. However, as your Web site increases in size, it becomes more difficult to manage. If your Web site contains a lot of folders like the one shown in Figure 3.8, you're not going to be able to easily see what will happen when you publish. Fortunately, Expression Web offers the ability to filter the Copy Web Site view using the View dropdown, as shown in Figure 3.9.

Figure 3.9

Figure 3.9 You can quickly filter the Copy Web Site view using the View dropdown. In this case, I've decided to view all the files that will be published. Notice that Expression Web does not display any folders in this view.

Troubleshooting HTTP Publishing

Rule number 1 of publishing is this: If you're going to have a problem with a hosting company, it's going to happen when you are publishing your content. Most hosting companies do a great job of ensuring that people can always browse your site, but publishing is more complex and requires a more precise configuration.

The second rule of publishing is that most hosting companies will deny responsibility when it comes to publishing problems. That means that you are going to have to do your own troubleshooting.

To troubleshoot publishing problems, you're going to need to install software that can capture information between your computer and the remote computer. The two tools I use for doing this are Ethereal and Fiddler, both of which are free tools and available for download on the Internet.

Ethereal (see Figure 3.10) is a network protocol analyzer. That's a fancy way of saying that it captures all traffic that flows to and from the network card on your computer. It features a great filter so that you can zero in on just the traffic you want to see. When dealing with Expression Web publishing issues, you're going to be interested in HTTP or FTP traffic. Ethereal is available from www.ethereal.com.

Figure 3.10

Figure 3.10 Ethereal is a very powerful network capture tool that is free and available via download from www.ethereal.com. Here I've captured the network traffic while opening a Web site using the FrontPage Server Extensions.

The other tool I use is Fiddler. Fiddler (see Figure 3.11) is an HTTP debugging proxy. That's a fancy way of saying that it logs all HTTP traffic on your machine. Fiddler has the added benefit of being able to log local traffic that doesn't travel over your network card. Fiddler is available from www.fiddlertool.com.

Figure 3.11

Figure 3.11 Fiddler targets HTTP traffic specifically. It's a great tool to use when troubleshooting publishing using HTTP.

HTTP Authentication Traffic

Most of the problems you'll encounter during publishing are authentication problems, meaning that the remote server doesn't accept your username and password. To troubleshoot this type of problem, you need to first understand what happens when things are working correctly.

To publish a Web site, you need to be able to write content to the remote Web site. For the Web server to verify that it should allow you to write to the content of the remote Web site, it needs to authenticate you. It does that by sending a 401 status code in response to your attempt to publish.

The client (in this case, Expression Web) responds to the 401 status code in one of two ways, depending on the type of authentication being used. You'll generally be using one of two authentication methods:

  • Windows Integrated Authentication—Windows Integrated authentication is authentication that's built into Windows itself. If your Web server indicates that it can accept Windows Integrated authentication, Expression Web will attempt to authenticate you using the user logged onto your computer. If that fails, you'll be prompted for a username and password.
  • Basic Authentication—Basic authentication will always prompt for a username and password.

Windows Integrated authentication uses encrypted data to authenticate you to the remote Web site. In fact, one of the benefits of Windows Integrated authentication is that it's a secure authentication mechanism. However, it was not designed to work on the Internet. In many cases, if your host is using Windows Integrated authentication, you'll be repeatedly prompted for a username and password and publishing will fail.

Basic authentication doesn't use encrypted credentials. Instead, basic authentication's Base64 encodes your username and password before sending it across the wire. Base64 encoding is a common encoding method used to transmit data across networks. It was actually developed for sending binary data, but it works well for sending text as well.

It's important to keep in mind that Base64 encoding provides nothing in the way of security. A quick Google search will turn up scores of utilities for decoding Base64-encoded data. You shouldn't think of this as a flaw in the method used by basic authentication. It's actually the way it was designed to work.

Using Fiddler to Troubleshoot HTTP Publishing Errors

Fiddler is a convenient tool to use for troubleshooting HTTP publishing because it targets only HTTP traffic. To start Fiddler, select it from the Start menu in Windows or use the Fiddler button in Internet Explorer, as shown in Figure 3.12.

Figure 3.12

Figure 3.12 Fiddler installs a button into Internet Explorer so you can always access it quickly when you need it.

After you start Fiddler, it will begin capturing HTTP traffic, as shown in Figure 3.11. At the right side of the Fiddler interface, you can see different views of the data. By clicking the Session Inspector tab, you can view the local computer traffic in the top half of the display and the remote traffic in the bottom half. A series of buttons appears above both panels, allowing you to change the format of the data that is displayed. When troubleshooting publishing issues, it's probably most helpful to click the Headers button for both panes, as shown in Figure 3.13.

Figure 3.13

Figure 3.13 Fiddler can break local and remote traffic into two panes. In this case, you can see that the server is using basic authentication.

You can use the information that Fiddler provides to help in troubleshooting publishing issues by analyzing the authentication information. You want to look for the 401 status sent by the remote server and select the line just below it in Fiddler, as shown in Figure 3.14. You should then see your local machine respond with the authorization information.

Figure 3.14

Figure 3.14 Fiddler will clearly show when you are sending authorization information to the remote server.

If you see that you are not sending authorization information to the server, you've got a problem on your end. However, if you see that you are sending information to the server, you're either sending the wrong credentials or there's a problem somewhere other than on your end.

Using Ethereal to Troubleshoot HTTP Publishing Errors

Ethereal is a much more powerful tool than Fiddler because it will capture all network traffic on your computer. However, with that power comes additional complexity. For that reason alone, I usually choose Fiddler over Ethereal for simple troubleshooting, but you may find that Ethereal offers features that are useful to you.

To use Ethereal, select Capture, Interfaces to display a list of network interfaces that you can capture. Browse to any Web site and look for the interface that shows an increasing number of packets (as shown in Figure 3.15) and then click the Capture button.

Figure 3.15

Figure 3.15 You will want to capture the interface that is connected to the Internet. Look for the interface with an increasing number of packets.

After you've started the capture, begin your publishing in Expression Web. At the point when you encounter a problem, switch back over to Ethereal and click the Stop button in the capture dialog, as shown in Figure 3.16.

Figure 3.16

Figure 3.16 The capture dialog shows the packet statistics during a capture. Click the Stop button to end the capture process.

Ethereal captures all traffic on the network, so there's a good chance that it will have captured a significant amount of data that is not related to your work in Expression Web. Fortunately, you can filter the captured data easily by simply entering http in the Filter textbox, as shown in Figure 3.17.

Figure 3.17

Figure 3.17 Filtering in Ethereal is a simple task using the Filter textbox.

The data collected in Ethereal will be in a similar format to the data collected in Fiddler. Once again, you want to look for Expression Web's response to the 401 status code sent by the Web server. (I've highlighted the 401 status code in Figure 3.17.)

Another powerful feature of Ethereal is its ability to display a conversation between Expression Web and the remote Web server in a readable format. By right-clicking on any of the captured data and choosing Follow TCP Stream from the menu, Ethereal will display the entire conversation, as shown in Figure 3.18. You can even save this information and send it to your host to demonstrate the problem.

Figure 3.18

Figure 3.18 An enormous benefit to Ethereal is its ability to display captured data as an entire conversation.

By using the data captures from Ethereal or Fiddler, you should have all you need to isolate publishing problems and possibly convince a stubborn host that the problem isn't on your end.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020