David
Wed Feb 11 08:08:26 CST 2004
Hold on. Please help us help you by organizing and presenting consistent
data.
1. Please give the exact request you gave in Telnet that results in a 400.
If you need irrefutable evidence, make a NetMon capture of it as well as
metabase configuration for the URLs in question, and that's about all that's
need.
2. Please give the exact request you gave which resulted in a 404.
Ken asked for the request that resulted in a 404, and you gave a request
that resulted in 400 -- please give corroborating info. 400 Bad Requests
are only stored in HTTPERR -- 404 requests would be in W3SVC# -- where are
you getting your info and how are you sure it's the right one?
Also, the following statement does not make sense
"when you browse to the VirtualDir it is resolved as it should but when
called from telnet it omits the master directory name and tries to go to
wwwroot/virtdir/.... ratherthan wwwroot/www.myserver.com/virtdir/..."
I have no idea what you mean by "master directory name", nor what exact
request you sent to "browse to the VirtualDir", nor what is your exact
URL-to-PhysicalPath mapping for the URL requests in question. If you don't
give this info, the whole statement cannot be understood.
i.e.
"browse to the VirtualDir in Telnet":
GET /VirtualDir/ HTTP/1.1\r\n
Host: www.myserver.com\r\n
\r\n
www.myserver.com maps to C:\inetpub\wwwroot\www.myserver.com
C:\inetpub\wwwroot\www.myserver.com\VirtDir is a physical directory
www.myserver.com/VirtualDir is a vdir mapping to ???
Finally, I hope you have Web Service Extensions corresponding to .JSP and
.PHP since they will return 404.2 otherwise.
There is one thing I can think of with other clients calling into web
services and getting failures, and that is if they send their requests with
\n line-termination -- that is rejected by IIS because it is improper
HTTP -- occassionally, some bad clients will send the request line with \r\n
but the headers with \n (also invalid per HTTP spec), with the end result
that IIS doesn't see a valid host header and hence believe it to be 400 Bad
Request. To diagnose this, you will need a NetMon network trace.
To be certain, I do not believe there is a security issue nor a problem with
Telnet and down-level clients. When we are talking about 400 and 404,
giving us the right entries in the log files which reflect the 400 and 404
quickly resolves the issue.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Ed" <anonymous@anonymous.microsoft.com> wrote in message
news:ufiDJBJ8DHA.1636@TK2MSFTNGP12.phx.gbl...
Ken,
The only info in the logs is 400 - BadRequest.
However I have had a bit of a break-through - perhaps you can help with the
solution?
I have found that the Directory mappings are causing the problems..Let me
try to explain:
www.myserver.com is configured as a Website, and is configured as
application
www.myserver.com/VirtualDir/ is a subdirectory, (no mappings taking place,
just a standard subdirectory)
when you browse to the VirtualDir it is resolved as it should but when
called from telnet it omits the master directory name and tries to go to
wwwroot/virtdir/.... ratherthan wwwroot/www.myserver.com/virtdir/...
I hope this makes sense!!
Thanks again
Ed
"Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
news:OmrdN1I8DHA.1000@TK2MSFTNGP11.phx.gbl...
> Can you go into your IIS logfiles and check the HTTP substatus code
please?
>
> Cheers
> Ken
>
>
> "Ed" <anonymous@anonymous.microsoft.com> wrote in message
> news:%23qYd0HI8DHA.2812@TK2MSFTNGP11.phx.gbl...
> : Ken,
> :
> : Thanks for your help so far, In response to your questions;
> :
> : a) just to clarify we have a number of down level clients connecting to
> the
> : web services.
> : b) Yes it is when telneting in that the 404 error is generated, when
> called
> : from a web browser, or wFetch the page is called and all works, I am
> : convinced it is a security issue with IIS.
> :
> : example telnet session:
> : telnet www.myserver.com 80
> : GET
> :
/VirtualDir/WebserviceName.asmx/MethodName?Param1=param2¶m2=Param2...
> : HTTP/1.1
> : HOST: www.myserver.com
> :
> : returns:
> :
> : HTTP/1.1 404 Not Found
> : Date: Wed, 11 Feb 2004 09:06:48 GMT
> : Server: Microsoft-IIS/6.0
> : MicrosoftOfficeWebServer: 5.0_Pub
> : X-Powered-By: ASP.NET
> : X-AspNet-Version: 1.1.4322
> : Cache-Control: private
> : Content-Type: text/html; charset=utf-8
> : Content-Length: 1533
> :
> : ....
> :
> : If I compose the URL as follows:
> :
> :
>
www.myserver.com/VirtualDir/WebserviceName.asmx/MethodName?Param1=param2&par
> : am2=Param2...
> :
> : copy and paste it into a browser all works fine !!??
> :
> : TIA
> :
> : Ed
> :
> : ==========================================
> : "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
> : news:e2ceOTE8DHA.2028@TK2MSFTNGP10.phx.gbl...
> : > Hi,
> : >
> : > There may be several reasons why you are getting a 404. From your
post,
> : > there's not enough information to definitively point to one reason:
> : >
> : > a) your subject refers to problems with down-level clients, but in
your
> : post
> : > you refer to web-services? How are they related? Is it down-level
> clients
> : > connecting to webservices?
> : >
> : > b) Telnet can be used to simulate any type of request, including HTTP
> : > requests, eg:
> : > telnet> open www.myserver.com 80
> : > GET / HTTP/1.1
> : > HOST: www.myserver.com
> : > [enter]
> : > [enter]
> : > simulates a basic GET request for the default page of
www.myserver.com.
> : What
> : > exactly are you typing into Telnet that results in a 404?
> : >
> : > c) Some articles that may help:
> : >
> : >
http://support.microsoft.com/?id=326965
> : > IIS 6.0 Does Not Serve Unknown MIME Types
> : >
> : >
http://support.microsoft.com/default.aspx?scid=kb;en-us;315122
> : > HTTP Error 404 - File or Directory not found" error message when you
> : request
> : > dynamic content with IIS 6.0
> : >
> : > Cheers
> : > Ken
> : >
> : >
> : > "ED" <anonymous@discussions.microsoft.com> wrote in message
> : > news:FDF8901F-1B74-4764-9541-634B36C1BD59@microsoft.com...
> : > : I have recently upgraded our environment to Windows Server 2003 and
> thus
> : > IIS 6. I have managed to get all the dynamic pages serving without a
> : > problem, all are working fine. Some of our customers connect to our
> : > webservices from JSP, PHP...etc and keep getting Error 404 page can
not
> be
> : > found.
> : > :
> : > : After lengthy debugging we have replicated the problem when
telnetting
> : > into the server and generating our own requests. All the clients can
> : access
> : > the web services from browsers via HTTP POST & GET, but when attempted
> : from
> : > Telnet the 404 is returned. I have run wFetch and this works fine.
> : > :
> : > : Any suggestions warmly received as this is driving me up the wall!
> : > :
> : > : TIA
> : >
> : >
> :
> :
>
>