除localhost之外的URL的httplistener

时间:2016-01-28 19:18:50

标签: c# httplistener

我试图在c#中使用httplister来侦听客户端请求,但它仅适用于http://www.anywebsite.com/ 我该如何收听unmap

我正在使用以下代码

 <body ng-controller="auctions">
<input type="text" value="test" ng-model="man">
{{man}}
<hr>
<div class="search" >
  <input type="text">
  <div class="res" ng-repeat="auction in auctions">
    {{auction}}
  </div>

</div>

1 个答案:

答案 0 :(得分:1)

我已经在我的计算机上测试了您的代码并且它已经运行了。 试试我修改了我的C:\ Windows \ System32 \ drivers \ etc \ hosts文件并添加了行

127.0.0.1   www.dfdfdfdfdfd.com

然后我打开了一个新的命令提示符并使用

进行了测试
ping www.dfdfdfdfdfd.com

`我已经使用边缘浏览器进行了成功测试

相关问题