I have an InfoPath 2010 form on my SP2010 farm using Form Services which doesn't call an XML file or web services correctly. I'm trying to get list data by calling:
https://sp.domain.com/_vti_bin/owssvr.dll?Cmd=Display&List={d2b0b951-9673-4c59-b294-803ab6994b8d}&XMLDATA=TRUE&noredirect=true
And the form errors as seen below
Request Types XML file error System.Net.WebException: The form cannot run the specified query. ---> Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterException: The form cannot run the specified query. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterXmlFile.GetXmlFileStreamThroughHttpRequest(Uri fileUri, DataAdapterCredentials credentials)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterXmlFile.<>c__DisplayClass4.<ExecuteNonSolutionFile>b__0(Boolean differentIdentity)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterUtil.Impersonate(DataAdapterInformation adapterInfo, String userName, String userDomain, String password, CodeToRunUnderImpersonation codeToRun)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterUtil.Impersonate(DataAdapterInformation adapterInfo, String userName, String password, CodeToRunUnderImpersonation codeToRun)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterXmlFile.ExecuteNonSolutionFile(String fileUrl, XPathNavigator output, Document document, DataAdapterCredentials credentials, Boolean useDcl, Int64& auxDomSize)
--- End of inner exception stack trace ---
at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterXmlFile.HandleExecuteException(Exception exception, String safeMessage)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterXmlFile.ExecuteNonSolutionFile(String fileUrl, XPathNavigator output, Document document, DataAdapterCredentials credentials, Boolean useDcl, Int64& auxDomSize)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterXmlFile.Execute(String fileUrl, XPathNavigator output, Document document, DataAdapterCredentials credentials, Boolean useDcl, Int64& auxDomSize)
at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapterXmlFile.ExecuteInternal(XPathNavigator output)
at Microsoft.Office.InfoPath.Server.DocumentLifetime.OMExceptionManager.ExecuteOMCallWithExceptions(OMCall d, ExceptionFilter exceptionFilter) LogId: 5566 Details: The remote server returned an error: (401) Unauthorized.
--- End of inner exception stack trace ---
at Microsoft.Office.InfoPath.Server.DocumentLifetime.OMExceptionManager.ExecuteOMCallWithExceptions(OMCall d, ExceptionFilter exceptionFilter)
at Microsoft.Office.InfoPath.Server.DocumentLifetime.OMSecurityContext.ExecuteOMCall(Solution solution, SecurityLevel methodSecurityLevel, ExceptionFilter exceptionFilter, OMCall d)
at RequestForm.FormCode.FormEvents_Loading(Object sender, LoadingEventArgs e)
request type location is https://sp.domain.com/_vti_bin/owssvr.dll?Cmd=Display&List={d2b0b951-9673-4c59-b294-803ab6994b8d}&XMLDATA=TRUE&noredirect=true
When loading the form from the two web front ends, it works great. Running it from the app server or a client machine, it errors. If I run the XML URL from the app or client machine, it downloads the file with data. Each instance I've logged in as the farm account.
Any ideas?