I have InfoPath form which I am using data connection to call the SharePoint lists web service for CheckOutFile and other data connection for UndoCheckOut. The web service working fine for check out file but UndoCheckOut is not working. I found below error in ULS log.
System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.GetResponseHelper(WebRequest request, DataAdapterCredentials credentials, Stopwatch timer, ExecWebRequestExceptionState state, String adapterName, Boolean isQuery)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.ExecWebRequestSync(XPathNavigator inputSubDOM, Boolean[] inputUseDataset, XPathNavigator resultsSubDOM, Boolean resultUseDataset, XPathNavigator errorsSubDOM, Uri serviceUrl, Uri soapAction, Int64 timeOutMillisec, DataAdapter adapter, Document document, DataAdapterCredentials credentials, Boolean useDcl, Boolean useProxy, Boolean useSelf) StackTrace:
at Microsoft.Office.Server.Native.dll: (sig=9c1dedf3-7988-46c6-81ff-ee228835ba07|1|Microsoft.Office.Server.Native.pdb, offset=1065B)
at Microsoft.Office.Server.Native.dll: (offset=2019F)
Outer Exception: The remote server returned an error: (500) Internal Server Error. Server was unable to process request. ---> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). Stack trace:
at Microsoft.Office.InfoPath.Server.Util.InfoPathException.LogException(Exception e)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.HandleExecWebRequestException(Document document, Exception exception, ExecWebRequestExceptionState state, Byte[] exceptionResponse, Ids errorId)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.ExecWebRequestSync(XPathNavigator inputSubDOM, Boolean[] inputUseDataset, XPathNavigator resultsSubDOM, Boolean resultUseDataset, XPathNavigator errorsSubDOM, Uri serviceUrl, Uri soapAction, Int64 timeOutMillisec, DataAdapter adapter, Document document, DataAdapterCredentials credentials, Boolean useDcl, Boolean useProxy, Boolean useSelf)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterWebServiceQuery.Execute(Uri soapAction, Uri serviceUrl, XPathNavigator queryParamSubDOM, XPathNavigator resultsSubDOM, XPathNavigator errorsSubDOM, Int64 timeout, Document document, DataAdapterCredentials credentials, Boolean useDcl, Boolean useProxy, Boolean useSelf)
at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapterWebServiceQuery.ExecuteInternal(XPathNavigator queryFields, XPathNavigator resultFields, XPathNavigator errors)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.RuleAction.EvaluateExpression(Document document, XPathNavigator currentTarget)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.RulesRuleSet.EvaluateExpression(Document document, XPathNavigator targetNavigator)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonFormCode.Click(Document document, XPathNavigator container)
at Microsoft.Office.InfoPath.Server.DocumentLifetime.EventClick.Play(Document document, BindingServices bindingServices, EventLogProcessor eventLogProcessor)
at Microsoft.Office.InfoPath.Server.DocumentLifetime.EventLogProcessor.ExecuteLog(Int32 expectedEventLogID)
at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.<>c__DisplayClass13.<PlayEventLog>b__11()
at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)
at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.RunAndHandleExceptions(TryBlock tryblock)
at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.PlayEventLog(EventLog eventLog, Boolean partialPostback)
at Microsoft.Office.InfoPath.Server.Controls.PostbackPage.ProcessIndividual(HttpContext context, String eventLogText, Boolean firstEventLog)
at Microsoft.Office.InfoPath.Server.Controls.PostbackPage.OnPreInit(EventArgs e)
at System.Web.UI.Page.PerformPreInit()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at Microsoft.Office.InfoPath.Server.Controls.PostbackPage.<>c__DisplayClass1.<HandleRegularPostback>b__0()
at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)
at Microsoft.Office.InfoPath.Server.Controls.PostbackPage.HandleRegularPostback(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
Inner Exception The remote server returned an error: (500) Internal Server Error.. Stack trace:
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.GetResponseHelper(WebRequest request, DataAdapterCredentials credentials, Stopwatch timer, ExecWebRequestExceptionState state, String adapterName, Boolean isQuery)
at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.ExecWebRequestSync(XPathNavigator inputSubDOM, Boolean[] inputUseDataset, XPathNavigator resultsSubDOM, Boolean resultUseDataset, XPathNavigator errorsSubDOM, Uri serviceUrl, Uri soapAction, Int64 timeOutMillisec, DataAdapter adapter, Document document, DataAdapterCredentials credentials, Boolean useDcl, Boolean useProxy, Boolean useSelf).
The following query failed: UndoCheckOut (User: 0#.w|domain\username, Form Name: FundingSource2, IP: , Connection Target: , Request: https://sitename.coom/_layouts/15/FormServer.aspx?XmlLocation=filepath.xml&ClientInstalled=true&DefaultItemOpen=1&Source=https://sitename/Requests/Forms/AllItems.aspx%23InplviewHash63e34442-a65c-4b1c-b58b-289bff9ac89c, Form ID: urn:schemas-microsoft-com:office:infopath:FundingSource2:-myXSD-2014-01-05T23-50-47 Type: DataAdapterException, Exception Message: The remote server returned an error: (500) Internal Server Error. Server was unable to process request. ---> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) The remote server returned an error: (500) Internal Server Error.)