Can't access web service when connected to the network :: HTTP 407

巧了我就是萌 提交于 2019-12-08 06:22:23
Ian

Apparently, the IT guys that I've talked with is not aware of the corporate-wide ISA server.

Using Wireshark, I dumped the data to an HTML file (a standard HTTP 407 error page). It clearly showed the Hostname and IP address of the ISA server.

In short, the problem is the ISA server. Although it is still a mystery on why the machine would contact the ISA server if the IIS server hosting the site is located on the machine itself (localhost).

Workaround: Use the bypassonlocal property.

<configuration>
   <system.net>
      <defaultProxy>
         <proxy proxyaddress="<ISA-SERVER>" bypassonlocal="true"/>
      </defaultProxy>
   </system.net>
</configuration>

Try adding the following line to your hosts file:

127.0.0.1 machine.computer.local

Under "configuration" section in Web.config add this:

 <system.net>
   <defaultProxy enabled="true" useDefaultCredentials="true"></defaultProxy>
 </system.net>

Then works like a charm!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!