Re: IIS 5.1 not working Help

From: Roland Hall (nobody_at_nowhere)
Date: 01/20/05


Date: Wed, 19 Jan 2005 19:12:36 -0600


"Jason Brown [MSFT]" wrote in message
news:e665$3n$EHA.2804@TK2MSFTNGP15.phx.gbl...
: Just to jump back in, I just tested your assertions on telnet.
:
: 1. it doesn't need to be uppercase
: 2. you don't need to press enter twice.
:
: I'm not sure what client you're using or indeed what HTTP server you
tested
: against but with the default Win XP client against IIS 5.1 neither of the
: above is correct. You're right in saying if it doesn't connect you can't
: issue a GET request, but with the XP client you don't get a lot of useful
: feedback on whether it's connected or not by default. just so we're all
: clear.
:
: what client are you using?

I'm using the XP Pro SP2 Telnet Client.

>From a command prompt:

telnet localhost 80

If I do not press ENTER twice, it just sits there. I read a document a long
time ago that ENTER twice was required.
I also read UPPER CASE was required. I'm not just making this stuff up.
I'm just using it how it works for me. Your mileage may vary.

If I use lower case and enter: get / http/1.1
I get this:

HTTP/1.1 400 Bad Request
Server: Microsoft-IIS/5.1
Date: Thu, 20 Jan 2005 01:08:40 GMT
Content-Type: text/html
Content-Length: 87

<html><head><title>Error</title></head><body>The parameter is incorrect.
</body>
</html>

Connection to host lost.

If I use UPPER CASE and enter: GET / HTTP/1.1
I get this:

HTTP/1.1 400 Bad Request
Server: Microsoft-IIS/5.1
Date: Thu, 20 Jan 2005 01:09:24 GMT
Connection: close
Content-Length: 4009
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html dir=ltr>

<head>
<style>
a:link {font:8pt/11pt verdana; color:FF0000}
a:visited {font:8pt/11pt verdana; color:#4e4e4e}
</style>

<META NAME="ROBOTS" CONTENT="NOINDEX">

<title>The page cannot be found</title>

<META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
</head>

<script>
function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm

        //For testing use DocURL =
"res://shdocvw.dll/http_404.htm#https://www.m
icrosoft.com/bar.htm"
        DocURL=document.URL;

        //this is where the http or https will be, as found by searching for
://
 but skipping the res://
        protocolIndex=DocURL.indexOf("://",4);

        //this finds the ending slash for the domain server
        serverIndex=DocURL.indexOf("/",protocolIndex + 3);

        //for the href, we need a valid URL to the domain. We search for the
# s
ymbol to find the begining
        //of the true URL, and add 1 to skip it - this is the BeginURL
value. We
 use serverIndex as the end marker.
        //urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
        BeginURL=DocURL.indexOf("#",1) + 1;
        urlresult=DocURL.substring(BeginURL,serverIndex);

        //for display, we need to skip after http://, and go to the next
slash
        displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
        InsertElementAnchor(urlresult, displayresult);
}

function HtmlEncode(text)
{
    return text.replace(/&/g, '&amp').replace(/'/g, '&quot;').replace(/</g,
'&lt
;').replace(/>/g, '&gt;');
}

function TagAttrib(name, value)
{
    return ' '+name+'="'+HtmlEncode(value)+'"';
}

function PrintTag(tagName, needCloseTag, attrib, inner){
    document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );
    if (needCloseTag) document.write( '</' + tagName +'>' );
}

function URI(href)
{
    IEVer = window.navigator.appVersion;
    IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );

    return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?
        encodeURI(href) :
        escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
}

function InsertElementAnchor(href, text)
{
    PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
}

//-->
</script>

<body bgColor="FFFFFF">

<table width="410" cellpadding="3" cellspacing="5">

        <td align="left" valign="middle" width="360">
        <h1 style="COLOR:000000; FONT: 13pt/15pt verdana"><!--Problem-->The
page
 cannot be found</h1>
    </td>
  </tr>

  <tr>
    <td width="400" colspan="2">
        <font style="COLOR:000000; FONT: 8pt/11pt verdana">The page you are
look
ing for might have been removed, had its name changed, or is temporarily
unavail
able.</font></td>
  </tr>

  <tr>
    <td width="400" colspan="2">
        <font style="COLOR:000000; FONT: 8pt/11pt verdana">

        <hr color="#C0C0C0" noshade>

    <p>Please try the following:</p>

        <ul>
      <li>If you typed the page address in the Address bar, make sure that
it is
 spelled correctly.</li>

      <li>Open the

          <script language="JavaScript">
          <!--
          if (!((window.navigator.userAgent.indexOf("MSIE") > 0) &&
(window.navi
gator.appVersion.charAt(0) == "2")))
          {
                Homepage();
          }
          -->
          </script>

          home page, and then look for links to the information you
want.</li>

                 <li>Click the
                 <a href="javascript:history.back(1)">
                 Back</a> button to try another link.</li>
    </ul>

    <h2 style="COLOR:000000; FONT: 8pt/11pt verdana">HTTP 400 - Bad
Request<br>
    Internet Information Services</h2>

        <hr color="#C0C0C0" noshade>

        <p>Technical Information (for support personnel)</p>

<ul>
<li>More information:<br>
<a
href="http://www.microsoft.com/ContentRedirect.asp?prd=iis&sbp=&pver=5.0&pid=
&ID=400&cat=web&os=&over=&hrd=&Opt1=&Opt2=&Opt3=" target="_blank">Microsoft
Supp
ort</a>
</li>
</ul>

    </font></td>
  </tr>

</table>
</body>
</html>

Connection to host lost.

The 400 Bad Request is because I don't have a default document.

-- 
Roland Hall
/* This information is distributed in the hope that it will be useful, but 
without any warranty; without even the implied warranty of merchantability 
or fitness for a particular purpose. */
Online Support for IT Professionals - 
http://support.microsoft.com/servicedesks/technet/default.asp?fr=0&sd=tech
How-to: Windows 2000 DNS: 
http://support.microsoft.com/default.aspx?scid=kb;EN-US;308201
FAQ W2K/2K3 DNS: 
http://support.microsoft.com/default.aspx?scid=kb;EN-US;291382