Error - The remote server returned an error: (500) Internal Server Error.

Pritesh dhameliya 1 Reputation point
2025-06-11T17:49:08.0666667+00:00

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.)

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Austin-H 3,040 Reputation points Microsoft External Staff Moderator
    2025-06-12T05:26:17.78+00:00

    Hi @Prahash Dhameliya 

    Thank you for reaching out to the Microsoft Q&A Forum. 

    Based on the error logs and my testing, one possible cause could be that the file is currently checked out by another user, which would cause the UndoCheckOut action to be denied by SharePoint. Other causes may still exist. 

    The user calling UndoCheckOut is not the one who checked out the file. 

    When a user checks out a file in SharePoint, the system records that person as the “temporary owner” of the file. This ensures that only that user has the right to edit or discard the check-out. 

    If another person (or a different account) tries to call the UndoCheckOut function, SharePoint will reject the request and return the error: Access is denied (E_ACCESSDENIED)

    If you want to perform an Undo CheckOut on a file in SharePoint, keep in mind: 

    Check whether the file is currently checked out 

    Go to the SharePoint document library → view the “Checked Out To” column. 

    If you see this icon on the file you want to edit, it means someone has already checked out the file. 

    User's image

    You cannot perform Undo CheckOut unless: 

    That person manually performs Discard Check Out (i.e., undoes the check-out themselves), 
    or You have special permissions such as “Override List Behaviors” 

    Identify whether the account has permissions such as Override Check Out, Manage Versions, or Full Control in SharePoint. 

    1. The account being used in InfoPath does not have sufficient permissions in SharePoint. 
    2. Go to the Document Library or the folder containing the file. 
    3. Click on Settings (⚙️) → Library Settings
      User's image
    4. Click here:  User's image
    5. Choose Permissions for this document library

    User's image

    1. Click the Check Permissions button.  

    User's image

    1. Enter your username or service account. 

    User's image

    Click Check Now → SharePoint will display the permission list of that account. If you want to undo someone else's check out, you must have the “Override List Behaviors” permission. 

    You currently do not have the required permissions to use the 'Undo Check Out' function in the InfoPath form. Please contact your administrator to request the 'Override Check Out' permission.

    If anything, I’ve mentioned is unclear or if I’ve misunderstood your situation, please feel free to let me know. I’ll be happy to assist further.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".    

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  


  2. Pritesh dhameliya 1 Reputation point
    2025-06-23T19:36:46.7933333+00:00

    Thank you Austin for response.

    I am using https://sharepointsite/_vti_bin/Lists.asmx web service in my InfoPath data connection to call the SharePoint lists web service [http://schemas.microsoft.com/sharepoint/soap/UndoCheckOut]. This webservice was working fine in SP 2010 but stop working after migration to SP 2019. The check out webservice data connection working fine, it is checking out correctly but undocheckout data connection is giving above error. The same person checking out the file fine but submit time form is checking back and giving error. If you can look and help would really appreciate.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.