I am trying to place the OWIN pipeline myself in a WinForms application. The pipeline hosts both static files and Web Api v2 content. The implementation works fine in place, but I'm not sure what I'm missing to have access to hosted files and APIs from remote computers on my network.
For simplicity, I downloaded a sample application for my own host from codeplex here and tried to access the test methods remotely after making the following changes to the base address (I tried how to run netsh regisration, so I start in administrator mode), and I still haven't I can access them. What do I need to change in the configuration in order to be able to view content from other computers on the same network?
static void Main() { string baseAddress = "http://*:10281/";
Here's the launch configuration, a fairly simple piece of material:
public class Startup { // This code configures Web API contained in the class Startup, which is additionally specified as the type parameter in WebApplication.Start public void Configuration(IAppBuilder appBuilder) { // Configure Web API for Self-Host HttpConfiguration config = new HttpConfiguration(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); appBuilder.UseWebApi(config); } }
source share