Trying to follow along to create a Data Connection Library but run into the following error:

The specified location does not exist or could not be opened. Choose a data connection library on a server running Microsoft SharePoint Server and specify a valid filename.

I was able to create the SharePoint Data Connection Library. Then I move to the To create a new data connection file in InfoPath section. I get to step 7 and encounter the error before I can finish.

I have my dataconnectionlibrary Data Connection that I just created highlighted.

enter image description here

I click Convert to Connection File button. Then as instructed, I put the address of the SharePoint Data Connection Library in followed by a chosen filename then the .udcx extension.

enter image description here

I hit OK, and at first, it looks like it's going to work, like everything's normal:

enter image description here.

Nope:

enter image description here.

This happens no matter which Connection link type I choose (Relative to the site collection OR Centrally managed connection library). This happens no matter where I specify to put the file; I can Browse to my own Documents folder and it still gives me this error.

Looking for any kind of help on this one. Trying to create the Data Connection Library due to 5566 error trying to auto populate user info with GetUserProfileByName using SOAP in InfoPath form. Is there a workaround, a different way to create the .udcx file? This is so frustrating, running into error after error just trying to auto-populate a Person Picker control.

  • Very simple solution, use Infopath 2010 instead of Infopath 2013. This will work. – user54527 May 24 '16 at 12:22
  • have you tried to create a normal file in that path, from the filebrowser? it may be a simple access issue. – Alberto Nov 23 '17 at 16:42

This may work for some people who may have InfoPath installed on the server which I think is a bad practice. I had the exact same problem and I logged onto the SharePoint server, then in the site I opened the form for edit in InfoPath, and then I followed the same steps to create a Connection File.

If you're doing this on Windows Server 2012, there's actually a much easier solution. You need to install the feature Desktop Experience (for reasons I don't quite understand, admittedly). You can get to it in Server Manager under Features > User Interfaces and Infrastructure.

Your machine will require a reboot, but after doing this, you'll be able to create the UDC file without any issue.

enter image description here

Use infopath 2010 instead of infopath 2013 when converting the data connection, then revert to using infopath 2013. This guaranteed to work.

There are two ways which this question could be answered: 1. Fix the problem causing the error so that the .udcx file can be created in the traditional way on our SharePoint 2013 environment, OR 2. Workaround the error and create the needed .udcx file some other way.

My answer will be the latter approach, a workaround.

1. Fix the problem causing the error so that the .udcx file can be created in the traditional way on our SharePoint 2013 environment

Some thoughts on the former approach. Unfortunately, the SharePoint “team” at my job consists of the Web Applications Manager and me—and I’m actually just a desktop support helpdesk technician that assists the Web Apps Manager one day a week. In short, we cannot figure out why we’re getting the “The specified location does not exist or could not be opened. Choose a data connection library on a server running Microsoft SharePoint Server and specify a valid filename,” error. We don’t have enough time to dedicate to the problem. We’ve already spent several hours on it, and we have a hunch that it’s due to a problem with the Desktop Experience in our environment.

Desktop Experience is installed. It’s turned on. Necessary services are installed. All the settings are correct, yet it still doesn’t work. Digging in some forums and making some connections, my Web Apps Manager thinks that this problem is the root of my problem with creating the .udcx file—during creation SharePoint or InfoPath need to “see” in Explorer. We can’t open anything from SharePoint or InfoPath (so far as any form is connected to our SharePoint) in Explorer.

So I had to come up with some other solution.

2. Workaround the error and create the needed .udcx file some other way

It’s fortunate for me that we’re still migrating from a SharePoint 2010 intranet to a SharePoint 2013 intranet. The 2010 environment is still live. So basically I created the .udcx file I needed following the traditional method in our 2010 environment, opened that file in Komodo Edit, changed the xml code to match our 2013 environment, uploaded the edited .udcx file to the Data Connection Library in the 2013 environment, then created a data connection directly to this new file in InfoPath (for a form to an item list in the 2013 environment needing GetUserProfileByName). Let me go through that step-by-step and show you what the xml code looks like in case you’re in a similar situation with no way to create the actual .udcx file other than manually.

a. Follow "To create a SharePoint Data Connection Library" section instructions steps 1-4 on both my SP 2010 environment and my SP 2013 environment.

  1. Browse to an SharePoint Server 2010 site on which you have at least Design permissions. If you are on the root site, create a new site before you continue with the next step.

  2. On the Site Actions menu, click More Options.

  3. On the Create page, click Library under Filter By, and then click Data Connection Library.

  4. On the right side of the Create page, type a name for the library, and then click the Create button.

b. Follow "To create a new data connection file in InfoPath" section instructions steps 2-5.

  1. Open InfoPath Designer 2010, click Blank Form, and then click Design Form.

Note that you can do this with a blank form from either environment or just use the actual form you need the data connection file for in the first place. The form isn’t really the important thing in this section—it’s that we get the data connection created with the correct settings.

  1. On the Data tab, click Data Connections, and then click Add.

  2. In the Data Connection Wizard, click Create a new connection to, click Receive data, and then click Next.

  3. Click the kind of data source that you are connecting to, such as Database, Web service, or SharePoint library or list, and then click Next.

  4. Complete the remaining steps in the Data Connection Wizard to configure your data connection, and then click Finish to return to the Data Connections dialog box.

I’m wanting a SOAP Web service connection to connect to User Profile Service, so that’s what I choose during step 4, and then enter [address of my SP 2013 home] followed by “/_vti_bin/UserProfileService.asmx” when prompted for a location. When prompted to Select an operation, I choose GetUserProfileByName. I leave the next few screens at default setting and click through until Finish.

c. Follow "To create a new data connection file in InfoPath" section instructions steps 6-8 using the SP 2010 environment’s Data Connection Library created in previous step a. I had to use this and not the SP 2013 library, because my issue was that I can’t get these steps to work in my SP 2013 environment.

  1. In the Data Connections dialog box, click Convert to Connection File.

  2. In the Convert Data Connection dialog box, enter the URL of the data connection library that you previously copied (delete "Forms/AllItems.aspx" and anything following it from the URL), enter a name for the data connection file at the end of the URL, and then click OK. It will take a few moments to convert and save the data connection file to the library.

  3. Confirm that the data connection was converted successfully by examining the Details section of the Data Connections dialog box while the name of the converted data connection is selected.

Now we have a working data connection file.

enter image description here

d. Make necessary edits, save .udcx file locally.

The original instructions talk about setting the Approval Status of this file to Approved. This isn’t really necessary at this point, because we’re not going to use this file in the SP 2010 environment. Instead, download it and open it with a code editor like Komodo. This is the good stuff:

enter image description here

We want to look at the <udc:WsdlUrl> tag, make sure that it’s set to [address of my SP 2013 home]/_vti_bin/UserProfileService.asmx?WSDL

We want to make sure that <udc:ServiceUrl> under <udc:SelectCommand> is set to [address of my SP 2013 home]/_vti_bin/UserProfileService.asmx

Delete what’s there and make the changes if necessary.

It should look like this:

<udc:ConnectionInfo Purpose="ReadOnly" AltDataSource="">
    <udc:WsdlUrl>[address of my SP 2013 home]/_vti_bin/UserProfileService.asmx?WSDL</udc:WsdlUrl>
<udc:SelectCommand>
    <udc:ListId/>
    <udc:WebUrl/>
    <udc:ConnectionString/>
    <udc:ServiceUrl UseFormsServiceProxy="false">[address of my SP 2013 home]/_vti_bin/UserProfileService.asmx</udc:ServiceUrl>
    <udc:SoapAction>http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/GetUserProfileByName</udc:SoapAction>
    <udc:Query/>
</udc:SelectCommand>
<udc:UpdateCommand>
    <udc:ServiceUrl UseFormsServiceProxy="false"/>
    <udc:SoapAction/>
    <udc:Submit/>
    <udc:FileName>Specify a filename or formula</udc:FileName>
    <udc:FolderName AllowOverwrite=""/>
</udc:UpdateCommand>
<!--udc:Authentication><udc:SSO AppId='' CredentialType='' /></udc:Authentication-->

Save the (edited) file to your desktop and maybe name it something like dataconnectionlibrary-SP13.udcx to differentiate it from the original.

e. Upload dataconnectionlibrary-SP13.udcx to SP 2013 Data Connection Library.

f. Open the InfoPath form that needs the data connection file in Designer. In the Data ribbon, choose Data Connections. Click Add. Choose Search for connections on a Microsoft SharePoint Server and click Next.

enter image description here

On the next screen, the Site we want is the address of the Data Connection Library on the SP 2013 environment. If it’s not in the dropdown, click Manage Sites and add it. Once it’s selected you’ll see an expandable section and the .udcx file we just uploaded. Note it’ll be named by the Title in the library and not the name; it might not be called dataconnectionlibrary-SP13; SharePoint automatically titled my file GetUserProfileByName, so that’s what I see.

enter image description here

At this point, the problem is solved. The result is the creation of a data connection that’s exactly the same as if we’d followed all the instructions on this article and traditionally created a .udcx file.

enter image description here.

Here’s the full XML for a basic .udcx file with default settings for a SOAP call to GetUserProfileByName:

<?xml version="1.0" encoding="UTF-8"?>
<?MicrosoftWindowsSharePointServices ContentTypeID="0x010100B4CBD48E029A4ad8B62CB0E41868F2B0"?>
<udc:DataSource MajorVersion="2" MinorVersion="0" xmlns:udc="http://schemas.microsoft.com/office/infopath/2006/udc">
<udc:Name>GetUserProfileByName</udc:Name>
<udc:Description>Format: UDC V2; Connection Type: WebService; Purpose: ReadOnly; Generated by Microsoft InfoPath 2010 on [date] at [time] by ADS\[user].</udc:Description>
<udc:Type MajorVersion="2" MinorVersion="0" Type="WebService">
    <udc:SubType MajorVersion="0" MinorVersion="0" Type=""/>
</udc:Type>
<udc:ConnectionInfo Purpose="ReadOnly" AltDataSource="">
    <udc:WsdlUrl>[home address]/_vti_bin/UserProfileService.asmx?WSDL</udc:WsdlUrl>
    <udc:SelectCommand>
        <udc:ListId/>
        <udc:WebUrl/>
        <udc:ConnectionString/>
        <udc:ServiceUrl UseFormsServiceProxy="false">[home address]/_vti_bin/UserProfileService.asmx</udc:ServiceUrl>
        <udc:SoapAction>http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/GetUserProfileByName</udc:SoapAction>
        <udc:Query/>
    </udc:SelectCommand>
    <udc:UpdateCommand>
        <udc:ServiceUrl UseFormsServiceProxy="false"/>
        <udc:SoapAction/>
        <udc:Submit/>
        <udc:FileName>Specify a filename or formula</udc:FileName>
        <udc:FolderName AllowOverwrite=""/>
    </udc:UpdateCommand>
    <!--udc:Authentication><udc:SSO AppId='' CredentialType='' /></udc:Authentication-->
</udc:ConnectionInfo>


"How To: Create and Use a Data Connection Library." Office Development SharePoint SharePoint 2010 SDK Documentation SharePoint Server 2010 General Reference Application Services InfoPath Forms Services Working with Data Connections How To: Create and Use a Data Connection Library. Microsoft, 2 Apr. 2010. Web. 27 Oct. 2014. MSDN.

"Universal Data Connection V2.0 Reference and Schema." Office Development SharePoint SharePoint 2010 SDK Documentation SharePoint Server 2010 General Reference Application Services InfoPath Forms Services Working with Data Connections Universal Data Connection V2.0 Reference and Schema. Microsoft, 7 Aug. 2013. Web. 27 Oct. 2014. MSDN.

  • Did you ever fix this issue? – Ami Schreiber Mar 20 '15 at 18:30
  • I resolved the issue with the answer I described. Whatever actually caused the issue in the first place remains an unresolved mystery. – adhoclobster Mar 27 '15 at 15:31

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.