Symptom
Downloading results from a SharePoint site query fails partly through the export with the following error: "The content can no longer be saved to the export location. Please ensure that it is available and has sufficient space."
Cause
This problem was caused by an authentication context switch when attempting to download an InfoPath Form. In this case the Download Manager (ddmanager.exe) needed a different set of credentials, when downloading the form XML file and failed during the process.
The following is from Fiddler that displays a GET request for file "Mobile%20Phone.xml", then a 302 redirect to the FormServer location.
# Result Protocol Host URL Body Caching Content-Type Process Comments Custom 3188 302 HTTPS portal.contoso.com /sites/it/DeviceElectionForm/Mobile%20Phone.xml 268 text/html; charset=UTF-8 ddmanager:16176 [#3421] 3189 302 HTTPS portal.contoso.com /sites/it/_layouts/15/FormServer.aspx?XmlLocation=/sites/it/MyCustomForm/Mobile%20Phone.xml 230 ddmanager:16176 [#3422] 3190 200 HTTPS portal.contoso.com /sites/it/_layouts/FormServer.aspx?XmlLocation=/sites/it/MyCustomForm/Mobile%20Phone.xml 52,702 private text/html; charset=utf-8 ddmanager:16176 [#3423] 3192 401 HTTPS portal.contoso.com /docs/eDiscovery/Contoso/_vti_bin/client.svc/ProcessQuery 16 text/plain; charset=utf-8 ddmanager:16176 [#3425] 3194 200 HTTPS portal.contoso.com /docs/eDiscovery/Contoso/_vti_bin/client.svc/ProcessQuery 156 private application/json; charset=utf-8 ddmanager:16176 [#3427]
As a result of connecting to the Form Server, a new authentication attempt was made to the InfoPath Service and a new cookie was set.
Example:
Set-Cookie: _InfoPath_Sentinel=1; path=/ Set-Cookie: _InfoPath_CanaryValueAGDGY5QQJELPCRVKY7AHEL2ZDV4S6L3TNF2GK4ZPNF2C6RDFOZUWGZKFNRSWG5DJN5XEM33SNUXUM33SNVZS65DFNVYGYYLUMUXHQ43OFJSEYZSWPFYTOM3FNQ4GQ3LDMJDDMU3UJZUFQ5CXMVYHOZSWMRIDKNJWIZKGYUCZMZTHO=izP1+walR/Pot5rgHGhAPaAT+7JmPc9SmDxul0xB28j/drucVscDCx9/bLapjqriSIvb32vU9RJjvk6Ag+Gygw==|636299581752872813; path=/; secure; HttpOnly SPRequestGuid: dd10f09d-2889-005f-7c5c-36f217b4f7ba
After this occurred, the Process Query failed with a 401, authentication was required, and the Download Manager subsequently stopped with error, "The Content can no longer be saved to the export location. Please ensure that it is available and has sufficient space".
As a result of this failure, inside this InfoPath Form, we are handling an error stating that cross-domain access is required to use this Form.
Example:
function UserAgentInfo() {} UserAgentInfo.strBrowser = 0;
UserAgentInfo.strBrowserType = 0;UserAgentInfo.intBrowserRmj = 0;
var g_objHasFormPostedBack_FormControl=false;
var g_objCurrentFormData_FormControl = [[[4,"An error occurred querying a data source.","An error occurred while trying to connect to a Web service.
","5566","dd10f09d-2889-005f-7c5c-36f217b4f7ba"],[4,"An error occurred querying a data source.
","An error occurred while trying to connect to a Web service.
","5566","dd10f09d-2889-005f-7c5c-36f217b4f7ba"],
[4,"An error occurred querying a data source.
","A query to retrieve form data cannot be completed because this action would violate cross-domain restrictions.
\r\n\r\nIf this form template is published to a SharePoint document library,
cross-domain access for user form templates must be enabled under InfoPath Forms Services in SharePoint Central Administration,
and the data connection settings must be stored in a UDC file in a data connection library in the same site collection.
\r\n\r\nIf this is an administrator-approved form template, the security level of the form must be set to full trust,
or the data connection settings must be stored in a UDC file by using the Manage data connection files option under InfoPath Forms Services
in SharePoint Central Administration.","6932","dd10f09d-2889-005f-7c5c-36f217b4f7ba"]]
As stated this is error handling in the form, but does hint that a different authentication policy is required.
With that said, we found the following error inside the download manager error log.
<?xml version="1.0" encoding="UTF-8"?> <Errors xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ErrorRecord> <Source> <Id>https://portal.contoso.com</Id> <Name>DakInfo</Name> <ServerSourceId>1</ServerSourceId> <SourceFilter>((((Author:"John Doe" OR Author:"Jane Doe" OR CreatedBy:"John Doe" OR CreatedBy:"Jane Doe" OR "John Doe" OR "Jane Doe"))) AND Path:"https://portal.contoso.com")</SourceFilter> <Type>SharePoint</Type> <Custodians/> </Source> <Errors> <Error> <Time>2017-05-09T15:12:06.2524869-05:00</Time> <Step>Prepare</Step> <ErrorType>UnableToRetrieveSearchFaults</ErrorType> <DiagnosticMessage>Attempted to perform an unauthorized operation.</DiagnosticMessage> </Error> </Errors> </ErrorRecord> </Errors>
Resolution
To workaround this issue, we excluded the connection to the FormServer from Download Manager by adding new SourceFilter within the Download Manager Configuration.
Example:
((((Author:"John Doe" OR Author:"Jane Doe" OR CreatedBy:"John Doe" OR CreatedBy:"Jane Doe" OR "John Doe" OR "Jane Doe"))) AND (Path:https://portal.contoso.com
AND Path NOT "https://portal.contoso.com/sites/it/MyCustomForm*")
More Information
eDiscovery in SharePoint
https://dev.office.com/sharepoint/docs/general-development/ediscovery-in-sharepoint
Welcome to the SharePoint Blog! Learn best practices, news, and trends directly from the SharePoint team.