.NET HttpListener Prefix issue with anything other than localhost
Posted
by jchristner
on Stack Overflow
See other posts from Stack Overflow
or by jchristner
Published on 2010-04-02T01:53:02Z
Indexed on
2010/04/02
2:13 UTC
Read the original article
Hit count: 918
I'm trying to use C# and HttpListener with a prefix of anything other than localhost and it fails (i.e. if I give it "server1", i.e.
http://localhost:1234
works, but
http://server1:1234
fails
The code is...
HttpListener listener = new HttpListener();
String prefix = @"http://server1:1234";
listener.Prefixes.Add(prefix);
listener.Start();
The failure occurs on listener.Start() with an exception of "Access is denied.".
© Stack Overflow or respective owner