简体   繁体   中英

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

I have a console application that communicates with a web service. Both of them are on the same machine.

When I am accessing the web service with the LAN disabled, it connects without a problem. But if the LAN is enabled and connected to our office network, I receive this error:

"HTTP 407 Proxy Authentication required - The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied."

We've been hunting the source of the problem for three days now. We have tried everything that we can think of. Any ideas what's causing the problem?

Additional notes: - The machine is in a Workgroup setup but with DNS suffix (computer.local). When accessing the web service, we type the address as " http://machine.computer.local/service.asmx "

  • I talked to the IT guys and they said that we don't have an ISA server installed

  • There is no "proxy" set in IE.

  • The machine is in mint condition.

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>

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

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

Then works like a charm!

尝试将以下行添加到您的主机文件:

127.0.0.1 machine.computer.local

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM