This is the case:
- Farm with one WFE and one APP-server. WFE hosts all sites, APP-server hosts all SharePoint web services. Names of servers: SPWFE01 and SPAPP01
- WFE can connect to internet through proxy.
- Web services should be bypassed, thus not called through proxy
Thus, I configured web.config as following:
<system.net>
<defaultProxy>
<proxy usesystemdefaults="false" proxyaddress="http://proxy" bypassonlocal="false" />
<bypasslist>
<add address="spwfe01"/>
<add address="spapp01"/>
<add address="139\.156\..*"/> <!-- IP-address range of Farm -->
<add address="10\.246\..*"/> <!-- backup IP-address range of Farm -->
</bypasslist>
</defaultProxy>
</system.net>
However, I get null reference exceptions when I call the UPA from code behind. When I remove above configuration, everything works as expected. Thus, web service calls are made through proxy, despite of bypasslist. What am I doing wrong here?