Hello,

On a Win 2000 SP4 server running IIS/5.0, when requesting a URL, like
www.foo.com, I get the following reply from the server :

HTTP/1.1 302 Found
Server: Microsoft-IIS/5.0
Location: /Default.aspx

though, default.aspx is defined in the default documents for that site.

Any idea what's wrong here, and why I don't get the 200 OK error code.

Christian

Re: 302 Found by Tom

Tom
Fri Mar 11 09:50:27 CST 2005

"Christian" <cgregoir99@yahoo.com> wrote in message
news:d0s7tk$f1k$1@reader1.imaginet.fr...
> Hello,
>
> On a Win 2000 SP4 server running IIS/5.0, when requesting a URL, like
> www.foo.com, I get the following reply from the server :
>
> HTTP/1.1 302 Found
> Server: Microsoft-IIS/5.0
> Location: /Default.aspx
>
> though, default.aspx is defined in the default documents for that site.
>
> Any idea what's wrong here, and why I don't get the 200 OK error code.

Does this explain the 302?
http://support.microsoft.com/kb/298408/EN-US/

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS



Re: 302 Found by Christian

Christian
Fri Mar 11 10:43:20 CST 2005

"Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> a écrit dans le message
de news:%23rToSIlJFHA.2132@TK2MSFTNGP14.phx.gbl...
> "Christian" <cgregoir99@yahoo.com> wrote in message
> news:d0s7tk$f1k$1@reader1.imaginet.fr...
> > Hello,
> >
> > On a Win 2000 SP4 server running IIS/5.0, when requesting a URL, like
> > www.foo.com, I get the following reply from the server :
> >
> > HTTP/1.1 302 Found
> > Server: Microsoft-IIS/5.0
> > Location: /Default.aspx
> >
> > though, default.aspx is defined in the default documents for that site.
> >
> > Any idea what's wrong here, and why I don't get the 200 OK error code.
>
> Does this explain the 302?
> http://support.microsoft.com/kb/298408/EN-US/
>

Thanks for the reply, though I don't think this article is related to this
issue since I do not access a subdir without the trailing slash.

Here is what I get from the command line :

C:> telnet www.foo.com 80
GET / HTTP/1.1
Host: www.foo.com

HTTP/1.1 302 Found
Server: Microsoft-IIS/5.0
Date: Fri, 11 Mar 2005 16:25:54 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Location: /Default.aspx
Cache-Control: private
Content-Type: text/html

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href='/Default.aspx'>here</a>.</h2>
</body></html>


This server holds several other web sites developed using ASP.NET and all
but this one work as expected. Having a look at their configurations, I
couldn't find any clear difference between them.

Any other idea ?

Christian



Re: 302 Found by Tom

Tom
Fri Mar 11 11:40:16 CST 2005

"Christian" <cgregoir99@yahoo.com> wrote in message
news:d0sghm$goa$1@reader1.imaginet.fr...
> "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> a écrit dans le message
> de news:%23rToSIlJFHA.2132@TK2MSFTNGP14.phx.gbl...
> > "Christian" <cgregoir99@yahoo.com> wrote in message
> > news:d0s7tk$f1k$1@reader1.imaginet.fr...
> > > Hello,
> > >
> > > On a Win 2000 SP4 server running IIS/5.0, when requesting a URL, like
> > > www.foo.com, I get the following reply from the server :
> > >
> > > HTTP/1.1 302 Found
> > > Server: Microsoft-IIS/5.0
> > > Location: /Default.aspx
> > >
> > > though, default.aspx is defined in the default documents for that
site.
> > >
> > > Any idea what's wrong here, and why I don't get the 200 OK error code.
> >
> > Does this explain the 302?
> > http://support.microsoft.com/kb/298408/EN-US/
> >
>
> Thanks for the reply, though I don't think this article is related to this
> issue since I do not access a subdir without the trailing slash.
>
> Here is what I get from the command line :
>
> C:> telnet www.foo.com 80
> GET / HTTP/1.1
> Host: www.foo.com
>
> HTTP/1.1 302 Found
> Server: Microsoft-IIS/5.0
> Date: Fri, 11 Mar 2005 16:25:54 GMT
> X-Powered-By: ASP.NET
> X-AspNet-Version: 1.1.4322
> Location: /Default.aspx
> Cache-Control: private
> Content-Type: text/html
>
> <html><head><title>Object moved</title></head><body>
> <h2>Object moved to <a href='/Default.aspx'>here</a>.</h2>
> </body></html>
>
>
> This server holds several other web sites developed using ASP.NET and all
> but this one work as expected. Having a look at their configurations, I
> couldn't find any clear difference between them.
>
> Any other idea ?

What happens if you "telnet www.foo.com/ 80"?

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS



Re: 302 Found by Christian

Christian
Fri Mar 11 12:04:46 CST 2005

"Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> a écrit dans le message
de news:OBnzpFmJFHA.2648@TK2MSFTNGP14.phx.gbl...
> "Christian" <cgregoir99@yahoo.com> wrote in message
> news:d0sghm$goa$1@reader1.imaginet.fr...
> > "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> a écrit dans le
message
> > de news:%23rToSIlJFHA.2132@TK2MSFTNGP14.phx.gbl...
> > > "Christian" <cgregoir99@yahoo.com> wrote in message
> > > news:d0s7tk$f1k$1@reader1.imaginet.fr...
> > > > Hello,
> > > >
> > > > On a Win 2000 SP4 server running IIS/5.0, when requesting a URL,
like
> > > > www.foo.com, I get the following reply from the server :
> > > >
> > > > HTTP/1.1 302 Found
> > > > Server: Microsoft-IIS/5.0
> > > > Location: /Default.aspx
> > > >
> > > > though, default.aspx is defined in the default documents for that
> site.
> > > >
> > > > Any idea what's wrong here, and why I don't get the 200 OK error
code.
> > >
> > > Does this explain the 302?
> > > http://support.microsoft.com/kb/298408/EN-US/
> > >
> >
> > Thanks for the reply, though I don't think this article is related to
this
> > issue since I do not access a subdir without the trailing slash.
> >
> > Here is what I get from the command line :
> >
> > C:> telnet www.foo.com 80
> > GET / HTTP/1.1
> > Host: www.foo.com
> >
> > HTTP/1.1 302 Found
> > Server: Microsoft-IIS/5.0
> > Date: Fri, 11 Mar 2005 16:25:54 GMT
> > X-Powered-By: ASP.NET
> > X-AspNet-Version: 1.1.4322
> > Location: /Default.aspx
> > Cache-Control: private
> > Content-Type: text/html
> >
> > <html><head><title>Object moved</title></head><body>
> > <h2>Object moved to <a href='/Default.aspx'>here</a>.</h2>
> > </body></html>
> >
> >
> > This server holds several other web sites developed using ASP.NET and
all
> > but this one work as expected. Having a look at their configurations, I
> > couldn't find any clear difference between them.
> >
> > Any other idea ?
>
> What happens if you "telnet www.foo.com/ 80"?
>

www.foo.com is one way to access the web server, the other being its IP
adress (say, telnet 123.45.67.89 80). Adding a trailing slash is useless.
Actually, it would not be a valid name.





Re: 302 Found by Ken

Ken
Sun Mar 13 02:26:45 CST 2005

Interesting situation... :-)

a) You don't have any redirects configured in IIS?

b) Is there another type of document higher up in the default document list
(e.g. an ASP page that does a Response.Redirect?)

c) Anything in ASP.NET that might be doing the redirect?

I don't think Tom's suggest would help you - you can only telnet to an IP
address (either directly using an IP address, or indirectly by requesting a
DNS name which is resolved to an IP address)

Cheers
Ken

"Christian" <cgregoir99@yahoo.com> wrote in message
news:d0sghm$goa$1@reader1.imaginet.fr...
: "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> a écrit dans le message
: de news:%23rToSIlJFHA.2132@TK2MSFTNGP14.phx.gbl...
: > "Christian" <cgregoir99@yahoo.com> wrote in message
: > news:d0s7tk$f1k$1@reader1.imaginet.fr...
: > > Hello,
: > >
: > > On a Win 2000 SP4 server running IIS/5.0, when requesting a URL, like
: > > www.foo.com, I get the following reply from the server :
: > >
: > > HTTP/1.1 302 Found
: > > Server: Microsoft-IIS/5.0
: > > Location: /Default.aspx
: > >
: > > though, default.aspx is defined in the default documents for that
site.
: > >
: > > Any idea what's wrong here, and why I don't get the 200 OK error code.
: >
: > Does this explain the 302?
: > http://support.microsoft.com/kb/298408/EN-US/
: >
:
: Thanks for the reply, though I don't think this article is related to this
: issue since I do not access a subdir without the trailing slash.
:
: Here is what I get from the command line :
:
: C:> telnet www.foo.com 80
: GET / HTTP/1.1
: Host: www.foo.com
:
: HTTP/1.1 302 Found
: Server: Microsoft-IIS/5.0
: Date: Fri, 11 Mar 2005 16:25:54 GMT
: X-Powered-By: ASP.NET
: X-AspNet-Version: 1.1.4322
: Location: /Default.aspx
: Cache-Control: private
: Content-Type: text/html
:
: <html><head><title>Object moved</title></head><body>
: <h2>Object moved to <a href='/Default.aspx'>here</a>.</h2>
: </body></html>
:
:
: This server holds several other web sites developed using ASP.NET and all
: but this one work as expected. Having a look at their configurations, I
: couldn't find any clear difference between them.
:
: Any other idea ?
:
: Christian
:
:



Re: 302 Found by David

David
Sun Mar 13 22:04:28 CST 2005

By-design. Nothing is wrong here, and after the courtesy redirect, the
browser should see the 200. This is just how it works -- when you start
looking at HTTP traffic, it is when you realize that a single action in the
browser may easily involve >1 request/response that you were simply unaware
of. This is just one such behavior during redirection; you will find others
in authentication, partion content, etc.

What actually happens is:
1. http://www.foo.com -- gets a courtesy 302 redirect from IIS to the
default document named /Default.aspx (that's what the location header tells
the client).
2. http://www.foo.com/Default.aspx -- IIS returns the specified document

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Christian" <cgregoir99@yahoo.com> wrote in message
news:d0s7tk$f1k$1@reader1.imaginet.fr...
Hello,

On a Win 2000 SP4 server running IIS/5.0, when requesting a URL, like
www.foo.com, I get the following reply from the server :

HTTP/1.1 302 Found
Server: Microsoft-IIS/5.0
Location: /Default.aspx

though, default.aspx is defined in the default documents for that site.

Any idea what's wrong here, and why I don't get the 200 OK error code.

Christian







Re: 302 Found by Christian

Christian
Mon Mar 14 03:47:28 CST 2005

"David Wang [Msft]" <someone@online.microsoft.com> a écrit dans le message
de news:%239x4kwEKFHA.1528@TK2MSFTNGP09.phx.gbl...
> By-design. Nothing is wrong here, and after the courtesy redirect, the
> browser should see the 200. This is just how it works -- when you start
> looking at HTTP traffic, it is when you realize that a single action in
the
> browser may easily involve >1 request/response that you were simply
unaware
> of. This is just one such behavior during redirection; you will find
others
> in authentication, partion content, etc.
>
> What actually happens is:
> 1. http://www.foo.com -- gets a courtesy 302 redirect from IIS to the
> default document named /Default.aspx (that's what the location header
tells
> the client).
> 2. http://www.foo.com/Default.aspx -- IIS returns the specified document

Thanks for the reply David.

That means that every time you request a URL without specifying a file name
(but with a trailing slash), you get a 302 redirect ??? Sounds pretty weird
to me ...

Look at the request below :
C:> telnet fr.yahoo.com 80
Trying 217.12.3.11...
Connected to fr.yahoo.com.
Escape character is '^]'.
GET / HTTP/1.1
Host: fr.yahoo.com

HTTP/1.1 200 OK
....

Following your statement, shouldn't I get something like that ? :
HTTP/1.1 302 Found
Location: /default.htm
....


What irks me is that the other web sites set up on that same IIS system
don't behave that way. They do have a list of default documents but
requesting, say, www.mysite.com, leads to a 200 OK reply for all of them.
And there's no redirect configured for that host, actually for any of them.

There must be some misconfiguration don't you think ?



Re: 302 Found by Christian

Christian
Mon Mar 14 04:01:20 CST 2005

"Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> a écrit dans le message de
news:%23fdeE45JFHA.1528@TK2MSFTNGP09.phx.gbl...
> Interesting situation... :-)
>
> a) You don't have any redirects configured in IIS?
>
> b) Is there another type of document higher up in the default document
list
> (e.g. an ASP page that does a Response.Redirect?)
>
> c) Anything in ASP.NET that might be doing the redirect?
>
> I don't think Tom's suggest would help you - you can only telnet to an IP
> address (either directly using an IP address, or indirectly by requesting
a
> DNS name which is resolved to an IP address)
>

Thanks for the reply Ken.

a) I don't have any redirects configured

b) default.aspx is on the top of the list of default documents

Now, this might be related to ASP.NET, that's right. But what ? I'm not used
to using Windows system and IIS, so if you have any idea ...



Re: 302 Found by Christian

Christian
Mon Mar 14 07:39:33 CST 2005

"Christian" <cgregoir99@yahoo.com> a écrit dans le message de
news:d0s7tk$f1k$1@reader1.imaginet.fr...
> Hello,
>
> On a Win 2000 SP4 server running IIS/5.0, when requesting a URL, like
> www.foo.com, I get the following reply from the server :
>
> HTTP/1.1 302 Found
> Server: Microsoft-IIS/5.0
> Location: /Default.aspx
>
> though, default.aspx is defined in the default documents for that site.
>
> Any idea what's wrong here, and why I don't get the 200 OK error code.
>
> Christian
>

OK, I've found a solution to the problem: renaming the Default.aspx file to
default.aspx (lowercase d), and doing the same in the default documents
list.

Can anyone tell me why does IIS seem to take care of filenames' case ?



Re: 302 Found by David

David
Mon Mar 14 12:40:50 CST 2005

> That means that every time you request a URL without specifying a file
> name (but with a trailing slash), you get a 302 redirect ??? Sounds
> pretty weird to me ...

No, you misunderstand what I said. Let me clarify.

It doesn't matter if it looks weird to you -- I see nothing in any formal
specification stating what you are expecting, and as long as the web server
is consistent with applying RFC2616, there is nothing wrong. Unless
fr.yahoo.com is running IIS, you cannot apply my statement to it.

What IIS chooses to do is to:
1. If the URL does not have a trailing slash, do courtesy-302-redirect logic
if applicable
2. If the URL has a trailing slash, try the default doc action (either serve
the default doc or dir browse, depending on what is enabled, with dir
browsing preceding default doc)

This is completely consistent with what you see at: fr.yahoo.com .

In other words:
http://www.foo.com results in GET / HTTP/1.1 -- #2 applies
http://www.foo.com/bar results in GET /bar HTTP/1.1 -- #1 applies if "bar"
is not a file


If you say that it works for other website on this server but not this one,
then you either have some IIS configuration that does this (I can't think of
anything immediately), or you have some ISAPI Filter/Extension that is
altering server behavior. Do you happen to *-scriptmap ASP.Net or run some
ISAPI Filter forwarder on the URL namespace?

Try to create a completely new website/host-name and see if it continues to
persist.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Christian" <cgregoir99@yahoo.com> wrote in message
news:d13l9t$nep$1@reader1.imaginet.fr...
"David Wang [Msft]" <someone@online.microsoft.com> a écrit dans le message
de news:%239x4kwEKFHA.1528@TK2MSFTNGP09.phx.gbl...
> By-design. Nothing is wrong here, and after the courtesy redirect, the
> browser should see the 200. This is just how it works -- when you start
> looking at HTTP traffic, it is when you realize that a single action in
the
> browser may easily involve >1 request/response that you were simply
unaware
> of. This is just one such behavior during redirection; you will find
others
> in authentication, partion content, etc.
>
> What actually happens is:
> 1. http://www.foo.com -- gets a courtesy 302 redirect from IIS to the
> default document named /Default.aspx (that's what the location header
tells
> the client).
> 2. http://www.foo.com/Default.aspx -- IIS returns the specified document

Thanks for the reply David.

That means that every time you request a URL without specifying a file name
(but with a trailing slash), you get a 302 redirect ??? Sounds pretty weird
to me ...

Look at the request below :
C:> telnet fr.yahoo.com 80
Trying 217.12.3.11...
Connected to fr.yahoo.com.
Escape character is '^]'.
GET / HTTP/1.1
Host: fr.yahoo.com

HTTP/1.1 200 OK
....

Following your statement, shouldn't I get something like that ? :
HTTP/1.1 302 Found
Location: /default.htm
....


What irks me is that the other web sites set up on that same IIS system
don't behave that way. They do have a list of default documents but
requesting, say, www.mysite.com, leads to a 200 OK reply for all of them.
And there's no redirect configured for that host, actually for any of them.

There must be some misconfiguration don't you think ?





Re: 302 Found by Christian

Christian
Tue Mar 15 10:41:49 CST 2005

"David Wang [Msft]" <someone@online.microsoft.com> a écrit dans le message
de news:O3k58iMKFHA.2748@TK2MSFTNGP09.phx.gbl...
> > That means that every time you request a URL without specifying a file
> > name (but with a trailing slash), you get a 302 redirect ??? Sounds
> > pretty weird to me ...
>
> No, you misunderstand what I said. Let me clarify.
>
> It doesn't matter if it looks weird to you -- I see nothing in any formal
> specification stating what you are expecting, and as long as the web
server
> is consistent with applying RFC2616, there is nothing wrong. Unless
> fr.yahoo.com is running IIS, you cannot apply my statement to it.
>
> What IIS chooses to do is to:
> 1. If the URL does not have a trailing slash, do courtesy-302-redirect
logic
> if applicable
> 2. If the URL has a trailing slash, try the default doc action (either
serve
> the default doc or dir browse, depending on what is enabled, with dir
> browsing preceding default doc)
>
> This is completely consistent with what you see at: fr.yahoo.com .
>
> In other words:
> http://www.foo.com results in GET / HTTP/1.1 -- #2 applies
> http://www.foo.com/bar results in GET /bar HTTP/1.1 -- #1 applies if "bar"
> is not a file
>
>
> If you say that it works for other website on this server but not this
one,
> then you either have some IIS configuration that does this (I can't think
of
> anything immediately), or you have some ISAPI Filter/Extension that is
> altering server behavior. Do you happen to *-scriptmap ASP.Net or run some
> ISAPI Filter forwarder on the URL namespace?
>
> Try to create a completely new website/host-name and see if it continues
to
> persist.
>

A I said in my reply to the original post, the problem is due to the case of
the default document. You may have an answer ?

Anyway, thanks for your hints.

Christian