Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WEB API 2, Selfhost, Access is denied for everything but "localhost"

In a WEB API 2 OWIN self host project I get "Access is denied" exception thrown for anything other then localhost in:

string baseUrl = http://localhost:2500;
WebApp.Start<Startup>(baseUrl);

If I use 127.0.0.1 or an actual IP address of the machine I get this exception. No one ever mentions this problem in their blogs about self hosted web api 2 owin based.

What is the problem here and how do I solve it?

I have found this Self hosted OWIN and urlacl but I get the same exception throw.

like image 805
elector Avatar asked Jan 11 '15 10:01

elector


1 Answers

This worked for me

What URL does OWIN understand for ipv6 self-hosting?

WebApp.Start<Startup>("http://+:43666");

I still think this should be mentioned and discussed in the WEB API 2 OWIN tutorials!

like image 50
elector Avatar answered Nov 04 '22 03:11

elector