This project has moved and is read-only. For the latest updates, please go here.

Self hosted OWIN and urlacl

May 20, 2013 at 5:33 AM
I've created a self hosted Nancy/SignalR application self-hosted in OWIN using Microsoft.Owin.Host.HttpListener and Microsoft.Owin.Hosting

Things work perfectly fine locally but as soon as I try to use anything but localhost to access the app I get a HTTP Error 503. The service is unavailable error. I can't even access the app using or the machine name.

I've tried adding the port to urlacl using

http add urlacl http://*:8989/ user=EVERYONE but doesn't seem to do anything.
May 20, 2013 at 5:38 PM
Can you show your WebApp.Start call?

Does WebApp.Start throw an exception? If it doesn't, then your urlacl is probably right (or you're running as admin).
May 20, 2013 at 7:45 PM
this is the code that wires up OWIN

we get no exception, things work normally when hit using localhost. also yes, we are running as Admin.
May 21, 2013 at 3:12 AM
Your code is only listening on http://localhost:{port}/
            var options = new StartOptions
                    App = GetType().AssemblyQualifiedName,
                    Port = _configFileProvider.Port

            _host = WebApplication.Start(options, BuildApp);
You need to use the url/urls property instead. Pass it the same url you put into the urlacl.
May 21, 2013 at 3:54 AM
Thanks alot,

Changing the start options to the code below fixed the problem. now the app is accessible across the network.
   var options = new StartOptions
        Url = "http://*:8989",
        App = GetType().AssemblyQualifiedName