Thursday, February 26, 2015

How to make web site running IIS Express accessible from a Raspberry Pi 2

I wanted to build a web site that is used by a Raspberry Pi 2 from Visual Studio without hosting the site in an IIS.

Was following the following this guide:

Got some errors, though it could be great for my own memory to write down the steps nessessary:

First step: Edititing the applicationhost.config:

Change "localhost" to the ip-number of the machine running the IIS Express (can be found by using command netconfig in the command prompt) ip-number is for example

Second step: Tell HTTP.SYS that everybody has access to the url:

netsh http add urlacl url=http://myhostname:58763/ user=everybody

If Everything works you get:
URL reservation successfully added

"everybody" needs to be "alla" in a swedish machine otherwise you get the following error message:

Create SDDL failed, Error: 1332 Felaktig parameter.

If you like me forget the / in the url that is write http://myhostname:58763 without trailing / you get the following error message:

Url reservation add failed, Error: 87 Felaktig parameter.

Third step: add an exception in the firewall:

netsh advfirewall firewall add rule name="IISExpressWeb" dir=in protocol=tcp localport=58763 profile=private remoteip=localsubnet action=allow

If Everything works you get:


If running the IIS Express from Visual studio you need to run as administrator, otherwise you get an error message that say you need to run as an administrator.

Check that you can access the machine running the IIS Express by entering ping in the command prompt in Raspberry pi. If you can access the machine, start the web browser and enter in the adress.

Now its possible to access the site.

1 comment:

Tech IT Solutions said...

Thanks to teach about the method to make web site running IIS Express accessible from a Raspberry Pi 2.I will publish the article to essay writing services uk website so that more people could learn this method.