400 bad request

So today I decided to work on a pet project of mine, where a Raspberry Pi is controlling a LED light. The Pi is controlled by a website.

Cool.

Except…

When the Pi tries to connect to my local running iis express server, the response is 400 bad request.

Why ohhh why.

IP address… Yes, the servers ip has changed, but I did change the connection url on the Pi, so what then?

A little digging with fiddler didnt show anything. I mean that literally, the connection attempts didnt show on the server, at all.

It turns out it was the %userprofile%\My Documents\IISExpress\config\applicationhost.config that needed a small update to reflect the new ip address.

old:

<binding protocol=”http” bindingInformation=”*:52591:localhost” />
<binding protocol=”http” bindingInformation=”*:52591:192.168.1.222″ />

new:

<binding protocol=”http” bindingInformation=”*:52591:*” />

wohooo, no ip address needed, asterix for the win 😀

More on http://max-it.dk/wp/2014/06/12/iis-express-enable-external-request/

Skriv et svar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *

This site uses Akismet to reduce spam. Learn how your comment data is processed.