static void Main()
{
string baseAddress = "http://localhost:4004/";
/*Render application
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrontVorm());
*/
// Start OWIN host
StartOptions options = new StartOptions();
options.Urls.Add("http://localhost:4004");
options.Urls.Add("http://127.0.0.1:4004");
options.Urls.Add(string.Format("http://{0}:4004", Environment.MachineName));
using (WebApp.Start<Program>(options))
{
// Create HttpCient and make a request to api/values
HttpClient client = new HttpClient();
}
}
如上绑定,外网服务访问(防火墙端口已经配置开放)
解决:
options.Urls.Add("http://+:4004");
本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/p/7944106.html,如需转载请自行联系原作者