« Previous Next »

Answered Thread: 400 Bad Request Errors not in HTTPERR Log

Last post 11-05-2009 10:13 AM by tomkmvp. 12 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (13 items)

Sort Posts:

  • 11-02-2009, 12:54 PM

    • pmoo
    • Not Ranked
    • Joined on 11-02-2009, 5:04 PM
    • Posts 5

    400 Bad Request Errors not in HTTPERR Log

    I have a web service running under IIS 6 on a Windows 2003 SP2 machine.  Approximately 37% of the calls to this service (33K of 88K) result in a 400 error according to the IIS logs. There are no corresponding 400 errors in the httperr log however.  We've also noticed that these errors originate with clients showing the same protocol and user agent combination in the IIS log:

     

    HTTP/1.1 MOZILLA/4.0+(COMPATIBLE;+MSIE+6.0;+MS+WEB+SERVICES+CLIENT+PROTOCOL+1.1.4322.2407)

     

    Interestingly, the same web service interface running on a W2K SP4 machine and IIS5 experiences 500 errors at a 70% rate from exactly the same protocol / user agent combination and the try/catch block at the top of the application does not report any uncaught exceptions.

     

    In both cases, a small percentage of the calls using the same protocol / user agent combination do succeed.

  • 11-02-2009, 9:44 PM In reply to

    • lextm
    • Top 10 Contributor
    • Joined on 10-22-2008, 12:18 AM
    • Shanghai, PRC
    • Posts 1,433

    Re: 400 Bad Request Errors not in HTTPERR Log

    Unless 400 is recorded in HTTP error logs, it is not likely to be generated by IIS itself. So you'd better review the application if you have its source code. Any dynamic pages, (ASP, ASP.NET) can freely set response status code to whatever they like.

    About the 500 errors I suspect they come from the pages possibly, but try {} catch {} cannot handle all exceptions. Please check Application event log in Event Viewer to check if there is any records.

    Lex Li
    Support Engineer at Microsoft
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 11-03-2009, 11:00 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,254
    • IIS MVPs

    Re: 400 Bad Request Errors not in HTTPERR Log

  • 11-03-2009, 11:07 AM In reply to

    • pmoo
    • Not Ranked
    • Joined on 11-02-2009, 5:04 PM
    • Posts 5

    Re: 400 Bad Request Errors not in HTTPERR Log

    no proxy but the service is behind a load balancer

  • 11-03-2009, 11:13 AM In reply to

    • pmoo
    • Not Ranked
    • Joined on 11-02-2009, 5:04 PM
    • Posts 5

    Re: 400 Bad Request Errors not in HTTPERR Log

    the application, as noted, is a web service so there are no "pages" and the code does not set the HTTP status code. Since the sole web service entry / exit point method is wrapped in the noted try/catch block, any uncaught exception within the application code will be trapped if it occurs within that context.

  • 11-03-2009, 5:28 PM In reply to

    Re: 400 Bad Request Errors not in HTTPERR Log

    Hi,

    That may well be the case but the point being made here is that if a web service hosted by IIS is returning a 400 error then that event will always be recorded in the httperr.log file by the http.sys service.

    If its not there then the 400 error wasn't generated by the Windows server and may well be coming from a device sitting between the client and the server.

    Regards,

    Paul Lynch | www.iisadmin.co.uk
  • 11-03-2009, 6:37 PM In reply to

    • pmoo
    • Not Ranked
    • Joined on 11-02-2009, 5:04 PM
    • Posts 5

    Re: 400 Bad Request Errors not in HTTPERR Log

    Paul,

     

    thanks, but as noted the 400 errors are in the IIS log on the server but not the HTTPERR log.  I can see the possibility of the 400 being generated in the MSFT .Net components between IIS and the web service application but this is indeed happening on this platform.

  • 11-03-2009, 10:55 PM In reply to

    • lextm
    • Top 10 Contributor
    • Joined on 10-22-2008, 12:18 AM
    • Shanghai, PRC
    • Posts 1,433

    Re: 400 Bad Request Errors not in HTTPERR Log

    I think some IIS tracing logs can help clarify why there are 400 in IIS logs.

    If you like, you can open a support case via http://support.microsoft.com.

    Lex Li
    Support Engineer at Microsoft
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 11-04-2009, 3:40 AM In reply to

    Re: 400 Bad Request Errors not in HTTPERR Log

     

    pmoo:
    thanks, but as noted the 400 errors are in the IIS log on the server but not the HTTPERR log

    Can you post the relevant extract from the IIS log file ?

    Regards,

    Paul Lynch | www.iisadmin.co.uk
  • 11-04-2009, 10:01 AM In reply to

    • pmoo
    • Not Ranked
    • Joined on 11-02-2009, 5:04 PM
    • Posts 5

    Re: 400 Bad Request Errors not in HTTPERR Log

    sure:

     2009-11-04 05:00:11 W3SVC1 SACG1LSIWBA03V 113.128.48.108 POST /ITWBServices/Monitoring/ITWBMonitor.asmx - 80 - 113.128.216.4 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+1.1.4322.2407) - vwebbh.ebiz.verizon.com 400 0 0 212 3466 312


    2009-11-04 05:00:11 W3SVC1 SACG1LSIWBA03V 113.128.48.108 POST /ITWBServices/Monitoring/ITWBMonitor.asmx - 80 - 113.128.216.4 HTTP/1.0 Java1.4.2_17 - vwebbh.ebiz.verizon.com 200 0 0 845 3526 265

     

  • 11-04-2009, 10:10 AM In reply to

    Re: 400 Bad Request Errors not in HTTPERR Log

    I suppose it could be possible that the http.sys is allowing it through and the iis logs are picking it it.

    You can change the registry setting for what the hhtp.sys would reject. I haven't ever changed this before but here is the procedure:

    http://support.microsoft.com/kb/820129/en-us

  • 11-04-2009, 9:16 PM In reply to

    • lextm
    • Top 10 Contributor
    • Joined on 10-22-2008, 12:18 AM
    • Shanghai, PRC
    • Posts 1,433

    Answered Re: 400 Bad Request Errors not in HTTPERR Log

    No, I don't think http.sys is involved here.

    Please check the SOAP content to see if there is anything wrong instead.

    http://www.w3.org/TR/soap12-part2/

    According to SOAP protocol the web service will return 400 when it meets a malformed request. This answers why 400 is recorded in IIS logs instead of HTTP error logs.

    Regards,

    Lex Li
    Support Engineer at Microsoft
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 11-05-2009, 10:13 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,254
    • IIS MVPs

    Re: 400 Bad Request Errors not in HTTPERR Log

    pmoo:
    2009-11-04 05:00:11 W3SVC1 SACG1LSIWBA03V 113.128.48.108 POST /ITWBServices/Monitoring/ITWBMonitor.asmx - 80 - 113.128.216.4 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+1.1.4322.2407) - vwebbh.ebiz.verizon.com 400 0 0 212 3466 312

    How was this request made?

Page 1 of 1 (13 items)
Microsoft Communities