"HTTP Error 400. The request hostname is invalid."
I think this means your IIS server is not accepting localhost as requested name.
http://forums.iis.net/t/1168442.aspx?HTTP+Error+400+The+request+hostname+is+invalid
http://stackoverflow.com/questions/24243375/why-do-i-see-http-error-400-the-request-hostname-is-invalid-when-connected-t
I think this means your IIS server is not accepting localhost as requested name.
http://forums.iis.net/t/1168442.aspx?HTTP+Error+400+The+request+hostname+is+invalid
http://stackoverflow.com/questions/24243375/why-do-i-see-http-error-400-the-request-hostname-is-invalid-when-connected-t