The URL '<file-name>' is invalid error on file checkout

Copper Contributor

Environment: SharePoint 2019 Multi-farm


I am getting the following error while checking out the file using the following API:



  "odata.error": {
    "code": "-2130575312, Microsoft.SharePoint.SPException",
    "message": {
      "lang": "en-US",
      "value": "The URL '<file-name>' is invalid.  It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web."

This issue occurs randomly on some files for some users. It works after some other user tries to checkout the same file.


Following is the snippet of the SharePoint logs.


System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'AllDocs_ParentId'. Cannot insert duplicate key in object 'dbo.AllDocs'. The duplicate key value is (26a68ae2-1944-442c-93dd-5af413c9c5b9, 0x, a655783a-5c82-45a1-8787-755fcb479515, 10960e22-b225-4deb-ae2c-196588bab10e, 255). The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behav... 355d03a0-2565-30d2-c7c2-102eb919bc60

2 Replies



For my understanding you should try:


1. SharePoint Database Server should have minimum 1 GB free space.
2. SharePoint Site application pool user/password is not expired.
3. Reset IIS and Recycle Application Pool of SharePoint site.


Someone just had the same problem with a easier fix:

@Joao Livio 


The issue was observed again but the provided solution did not work.


The following error was present at the same time in event viewer. How can I further debug this?

Faulting application name: w3wp.exe, version: 10.0.17763.1, time stamp: 0xcfdb13d8
Faulting module name: ntdll.dll, version: 10.0.17763.2237, time stamp: 0x65420ea4
Exception code: 0xc0000409
Fault offset: 0x000000000008fbdf
Faulting process id: 0x2b3c
Faulting application start time: 0x01d7f03793e041cc
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 15a79a05-7c61-4daa-97a1-940fc7949b49
Faulting package full name:
Faulting package-relative application ID: