We used "Userprofileservice" in infopath form to populate user’s details. It works perfectly on client form but once convert to UDC and open in the web form. It gets error:
A runtime exception was detected. Details follow.
Message: The remote server returned an error: (503) Server Unavailable.
Techinal Details:
System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
at System.Net.HttpWebRequest.GetResponse()
I know this is proxy error but still spent hours trying to solve the problem. Here are the list you need to check:
A. Disable the authentication loopback check
Re-enable the behavior that exists in Windows Server 2003 by setting the DisableLoopbackCheck registry entry in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa registry subkey to 1. To set the DisableLoopbackCheck registry entry to 1, follow these steps on the client computer:
- Click Start, click Run, type regedit, and then click OK.
- Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
- Right-click Lsa, point to New, and then click DWORD Value.
- Type DisableLoopbackCheck, and then press ENTER.
- Right-click DisableLoopbackCheck, and then click Modify.
- In the Value data box, type 1, and then click OK.
- Exit Registry Editor.
- Restart the computer.
B. Enable the Web Service Proxy for InfoPath Service in Central Admin
C. Make sure the “UseFormsServiceProxy” attribute is set to True
D. Check the Proxy Setting in web.config, and I added the url in the bypasslist that look like our SPNs aren’t set up correctly.
<system.net>
<defaultProxy>
<proxy usesystemdefault="false" proxyaddress="http://xx.xx.xx.xx:8080/" bypassonlocal="true" />
<bypasslist>
<add address="moss.company.local" />
</bypasslist>
</defaultProxy>
</system.net>
Incidentally, the <bypasslist> element allows you to use Regular Expression like “xxx.xxx*” to specify addresses, so you can exclude whole ranges at will – quite neat.
NB: Remember to IISREST or recycle to clear the server cache