How to fix Bad request response from IIS express 7 for one request from internet

7,650

Check the IIS logs at C:\inetpub\logs\wmsvc#. Your request might be coming in with HTML encoded characters instead of URL encoded like this:

http://1.2.3.4/Grid/Validate?_column=Toode&_entity=RidO&Toode=ooooo

If that's not the case, this Microsoft KnowledgeBase article might help you (it states windows server 2003 but if I remember correctly it could also apply to XP).

Share:
7,650

Related videos on Youtube

Andrus
Author by

Andrus

Updated on September 18, 2022

Comments

  • Andrus
    Andrus over 1 year

    I'm trying IISExpress 7 in Windows XP to servr requests from internet for ASP .NET MVC2 applicaton

    I changed line in iisexpress 7 applicationhost.config from

    <binding protocol="http" bindingInformation=":8080:localhost" />
    

    to

    <binding protocol="http" bindingInformation=":80:" />
    

    Request

    GET http://1.2.3.4/Grid/Validate?_column=Toode&_entity=RidO&Toode=ooooo HTTP/1.1
    Cookie: active=1; .EevaAuth=CF57FC098F341A1230626D5E339C9E94FE2D77157AAE54402DC2AB5F1AE1E079A9CB93B88B5479B4E926D3C6CDFF7D994E8FA1381CA32D20245A2A9C493B992F2E8863EA6C8E080886EDA103926096CB83B033490552F3CB9BFF62ABD5CFBA5181F378888BFF96D51400319AF8955B556D50A866
    Host: 1.2.3.4
    

    from internet causes Bad Request error:

    HTTP/1.1 400 Bad Request
    Cache-Control: private, s-maxage=0
    Content-Type: text/html
    Server: Microsoft-IIS/7.5
    X-AspNetMvc-Version: 2.0
    X-AspNet-Version: 2.0.50727
    X-Powered-By: Eeva ERP
    Date: Thu, 24 Nov 2011 11:52:30 GMT
    Content-Length: 11
    
    Bad Request
    

    If request is issed form localhost, this exception does not occur. All solutions which I have found describe that this is caused by ad characters in url. URL if this request http://1.2.3.4/Grid/Validate (ip addres changed) does not contain invalid characters.

    How to allow this request form internet to be processed?