开发者

HttpListener behind a router

开发者 https://www.devze.com 2023-03-19 06:05 出处:网络
I have just finished a program what can used to save webpages (I need it for specific reasons) and I wrote a html frontend to use it (a form), and it works, BUT only if I browse the page from localhos

I have just finished a program what can used to save webpages (I need it for specific reasons) and I wrote a html frontend to use it (a form), and it works, BUT only if I browse the page from localhost [localhost:4001], if I try to use my dynamic dns address, my HttpListener can't receive a request (it's port forwarded, and uTorrent webui works, with it's connection port)

I dont want to post my full code it's just a lot of string processing, but some parts:

server = new HttpListener();
server.Prefixes.Add("http://+:4001/");
public void StartListening()
{
   se开发者_如何学Gorver.Start();
   server.BeginGetContext(new AsyncCallback(ContextProc), null);
}

Have I left something, what is needed for HttpListener to receive connection through the internet?

(I've tried to use port 80 [usually apache uses this port], nothing happened)

0

精彩评论

暂无评论...
验证码 换一张
取 消