Escolar Documentos
Profissional Documentos
Cultura Documentos
The key to understanding the problem at hand is to know a little bit about HTTP status codes. Any time a client
issues an HTTP request to a Web server, the server returns a response code. These response codes are organized
into five categories.
Conclusion
As you can see, the individual HTTP error codes offer a lot of clues as to the cause of the problem. Even so,
sometimes you can't fix the problem until you can gather more information. Fortunately, there are some free
troubleshooting tools available that can help you to do just that. In Part 2 of this article, I will show you how
you can use tools to help in the troubleshooting process.
What is WFetch?
In order to understand what WFetch is, you have to understand that when an HTTP error occurs, Internet
Explorer does not display everything that it knows about the error, instead displaying what is known in
Microsoft circles as a "friendly error message." Even though the friendly error message may not be that helpful
in resolving the problem, there is lots of valuable information embedded in the HTTP request and response
packets.
WFetch is a part of the Internet Information Services (IIS) 6.0 Resource Kit. It is designed to help you extract
valuable troubleshooting information from the HTTP packet headers. You can download the IIS 6.0 Resource
Kit at Microsoft's Download Center.
Using WFetch
After you download and install the IIS 6.0 Resource Kit, you can access WFetch by clicking on the Windows
Start button and selecting the All Programs | IIS Resources | WFetch | WFetch command. When WFetch starts,
you will see a screen similar to the one that is shown in Figure A.
Figure A
This is what the WFetch console looks like.
At a minimum, there are two pieces of information that you must enter into WFetch. First, you must populate
the HOST field. This field is set to LOCALHOST by default, but you should replace the default entry with the
URL that you are having problems with.
The other thing you have to do is populate the PATH field. This is the specific page that you want to diagnose
on the website that you are having problems with. For example, suppose that I were having problems with the
following page on my website: http://www.brienposey.com/kb/windows_xp_firewall.asp If that were the case, I
would enter www.brienposey.com into the HOST field and /kb/windows_xp_firewall.asp into the path field.
Of course, these are not the only options that you can set. You also have the option of specifying a different
HTTP verb, although GET usually works fine.
It is also worth mentioning that WFetch is configured by default to use anonymous authentication. If you are
trying to troubleshoot a website that requires authentication, you do have the option of providing a set of
authentication credentials. In fact, you can even specify that you want to use Basic, NTLM, Kerberos, Digest, or
Negotiate authentication.
Some versions of WFetch allow you to save the password that you are using for authenticating into the specified
site. If you have such a version, you need to be aware that if you decide to save the password, it will be stored in
clear text in the Windows registry at HKEY_CURRENT_USER\Software\WFetch. That being the case, I do not
recommend saving passwords.
One last thing that I want to point out is the Connect option, found in the console's Connection section. By
default, WFetch is configured to connect to a site using the HTTP protocol, but you do have some other options
as well. You can connect using HTTPS, PCT 1.0, or one of several versions of SSL or TLS.
Once you have entered the various parameters for your test, just click the Go button. When you do, you will see
the connection request and the server's response displayed in the Log Output section. You can see an example
of this in Figure B. Notice in the figure that the HTTP status code is displayed just above the Log Output
window.
Figure B
The results are displayed in the Log Output window.
Conclusion
In this article, I have shown you how to use the WFetch tool to get a better look at the HTTP connection. In Part
3, I will conclude this series by showing you one last technique for getting more information about an HTTP
error message.
Friendly errors
One reason why HTTP errors are so hard to troubleshoot is that Microsoft likes to hide a lot of the details about
the error message from us. I don't think that this information is being obscured for security reasons or because
Microsoft wants to withhold information from us; rather, it seems to be an effort to help people who are less
computer literate.
For example, one of the most common types of HTTP error message is the 404 error. To see what a 404 error
looks like, just go to your favorite website and enter an invalid URL. When you do, you will most likely see an
error message like the one that is displayed in Figure A.
Figure A
A 404 error is one of the most common types of HTTP errors.
As you can see in the figure, the fine print tells you that a 404 error has occurred, and it even tells you that the
error occurred because a file was not found. That's really about the only technical information we get, though.
The rest of the information on the page is there to tell novices how they might be able to get around the error
message.
Sometimes friendly error messages are dressed up a bit. For example, if you go to my website
(www.brienposey.com) and enter an invalid URL, you will see a page similar to the one shown in Figure B.
This is still considered a friendly error message. I have simply replaced Microsoft's generic error message with
a message of my own. Many other sites use the same technique.
Figure B
Some websites use custom friendly errors.
Whether a site uses a generic or custom friendly error message, you probably won't get a lot of technical
information about the problem from it. Fortunately, there is something you can do. Internet Explorer contains an
option that you can use to display the real error message instead of the friendly error message.
The exact method of doing this varies from one version of Internet Explorer to another, but here's how it's done
in Internet Explorer 7. Choose the Internet Options command from the Tools menu. When Windows displays
the Internet Options properties sheet, go to the properties sheet's Advanced tab. Finally, deselect the Show
Friendly HTTP Error Messages check box, located in the Browsing section. When you're done, click OK.
Another reason why an error may not look any different than before is that Internet Explorer may not actually
be making a connection to the website. For example, if your Internet connection is down, you will get a 404
error message whether the page you requested actually exists or not.
Another common reason for continuing to receive generic error messages is that the requested page may be
cached. Try emptying the browser cache and then requesting the page again.
If you own the website that is having problems and that website is running on IIS 7, try accessing the site
locally, directly from the server console. Doing so will ensure that you receive a detailed error message. If a site
is coded using ASP.net, you may end up receiving ASP's custom errors instead of the detailed messages that
you are interested in. If this happens, you can fix the problem by temporarily embedding the following code
onto the page that you are troubleshooting:
‹system.web›
‹custom errors mode="Off" /›
‹/system.web›
Conclusion
In this article, I have explained how you can disable Internet Explorer's friendly error messages. I then went on
to talk about a couple of reasons why you may continue to see friendly error messages even when you have
disabled friendly error messages in your browser.