If you are getting the error when opening an infopath form 'error occured accessing data source error ID 5566 'its normally an authentication issue with the datasource the form is trying to retrieve data from. this normally occurs in 'cross Domain 'environments. the fix for me was to disable the 'authentication loopback' check:
1. Click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ LSA
3. Right-click LSA, point to new, and then click DWORD Value.
4. Type disableloopbackcheck, and then press Enter.
5. Right-click disableloopbackcheck, and then click Modify.
6. In the value data box, type 1, and then click OK.
7. Exit Registry Editor.
8. restart the computer.
Set-spinfopathformsservice-allowudcauthenticationfordataconnections $ true-allowuserformcrosdomaindataconnections $ true
Issue: Event Type: Warning
Event Source: Office Sharepoint Server
Event category: Forms Services runtime-data connections
Event ID: 5566
Date: 5/4/2010
Time: 11:15:55 AM
User: N/
COMPUTER: XXX
Description:
The following query failed: retriveidnumber (User: rompetrol \ ivladescu, form name: finalreport, IP:, request: http://www.it-share.ro/Form ID: urn: Schemas-Microsoft-com: Office: infopath: finalreport:-myXSD-2009-10-22T09-41-34, type: dataadapterexception, exception message: the form cannot run the specified query.
The remote server returned an error: (401) Unauthorized .)
Solution:
I recommend the second method.
Important This section, method, or task contains steps that tell you how to modify the registry. however, serious problems might occur if you modify the Registry incorrectly. therefore, make sure that you follow these steps carefully. for added protection, back up the registry before you modify it. then, you can restore the registry if a problem occurs. for more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 Http://support.microsoft.com/kb/322756) How to back up and restore the Registry in Windows
There are two methods to work around this issue, use one of the following methods, as appropriate for your situation.
Method 1: Specify host names (preferred method If NTLM authentication is desired)
To specify the host names that are mapped to the loopback address and can connect to web sites on your computer, follow these steps:
-
- Set the disablestrictnamechecking registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:281308Http://support.microsoft.com/kb/281308)Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name
-
- ClickStart, ClickRun, TypeRegedit, And then clickOK.
-
- In Registry Editor, locate and then click the following registry key:HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ LSA \ msv1_0
- Right-clickMsv1_0, PointNew, And then clickMulti-string value.
-
- TypeBackconnectionhostnames, And then press Enter.
-
- Right-clickBackconnectionhostnames, And then clickModify.
-
- InValue DataBox, type the host name or the host names for the sites that are on the local computer, and then clickOK.
-
- Quit Registry Editor, and then restart the IISADMIN service.
Method 2: Disable the loopback check (less-recommended method)
The second method is to disable the loopback check by settingDisableloopbackcheckRegistry key.
To setDisableloopbackcheckRegistry Key, follow these steps:
-
- Set the disablestrictnamechecking registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:281308Http://support.microsoft.com/kb/281308)Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name
-
- ClickStart, ClickRun, TypeRegedit, And then clickOK.
-
- In Registry Editor, locate and then click the following registry key:HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ LSA
- Right-clickLSA, PointNew, And then clickDWORD Value.
-
- TypeDisableloopbackcheck, And then press Enter.
-
- Right-clickDisableloopbackcheck, And then clickModify.
-
- InValue DataBox, type1, And then clickOK.
-
- Quit Registry Editor, and then restart your computer.
The solution is taken from: http://support.microsoft.com/kb/896861
One other is to disable anonymous access.