SharePoint 2016 / 2013 - InfoPath 2013 - Enabling Cross Domain Data Access

Introduction
 
Last week, I was working on migration project and I was receiving an error when attempting to open a new Infopath form. It was giving an error message for cross-domain restrictions. After reviewing the error message, I came to know that I have to enable cross-domain data access, and data connection should be in UDC file. Here, I am sharing steps to enable cross-domain data access for InfoPath. 
   
 
 
Key action to resolve this issue

I have enabled cross domain in Central Admin and stored data connection in UDC file but I was still getting the error message and then, a reference article helped me to fix the issue.  The article suggested to recycling the app pools. This worked for me and I hope this will fix your problem too.
 
Enable Cross Domain
  1.  Go to SharePoint Central Admin --> General Application Settings.
  2. Click on Configure InfoPath Forms Services under InfoPath Forms Services section, scroll down to next page and click on check box "Allow Cross-domain data access...."



  3. Click on OK



  4. Now, you can retest your InfoPath form and issue should be resolved. 
Reference

http://stevemannspath.blogspot.com/2013/11/sharepoint-2013-infopath-2013-enabling.html