C#의 HttpListener를 사용 할 때 외부 IP는 접속이 안되는 경우가 있다.
관리자 권한으로 실행해야 하며,
netsh 명령으로 ip를 등록 해줘야 한다.
HttpListener listener = new HttpListener();
listener.Prefixes.Add($"http://*:{port}/");
listener.Start();
listener.BeginGetContext(this.OnRequest, null);
netsh http add iplisten [ip]
netsh http show iplisten
'Develop' 카테고리의 다른 글
mysql index hint (0) | 2020.03.26 |
---|---|
The CloudFormation template is invalid (0) | 2020.01.14 |
Flutter Error 1 (0) | 2019.08.04 |
PowerShell - 덤프파일 압축 (0) | 2019.04.29 |
wpf textbox twoway (0) | 2018.12.13 |