k blog.kenaro.com
← All articles

InfoPath error & solution: InfoPath cannot open the following form <url> ... The file is not a valid XML document.

· Ingo Karstein

Yesterday I had a problem on a new SharePoint 2013 farm that took me some hours to solve it.

Problem:

I was not able to customize forms (again) using InfoPath on lists after creating them before sucessfully.

Steps to reproduce:

First I created a site collection and a custom list in it.

image

Than I use the “Customize Form”  button in the Ribbon menu. The new form opens in InfoPath designer.

image

Than I modify the form and publish it.

image

In the  browser I verify it’s working.

image

Than I want to change the form and click the Ribbon button “Customize Form” again.

image

Now this happens:

image

Error Message:

InfoPath cannot open the following form: http://sharepoint.local/sites/test/Lists/My New List/Item/template.xsn
The file is not a valid XML document.
DTD is prohibited.
Line 1, Position 9

When opening the URL of the InfoPath template in the browser I get this error from the Forms Server:

image

(Normally there would be a download dialog.)

Solution

It’s so simple… ;-) - After some network, log and code analytics I could figure out that you need…

… a site collection at the web application root!

Remember the first screenshot above. There I showed you the possible locations for the new site collection. As you can see the root “/” is available. This means: There is no site collection at the web app root.

image

After creating a site collection at the web application root I’m able to customize the list form with InfoPath. – After doing so:

image

Problem solved :-)

My friend and colleague Guido could reproduce the problem and validate the fix. - @Guido: Thank you (and have a good week while teaching SharePoint ;-) )!!!

Hints

As far as I have seen there are other solutions related to the same problem:

  • Check your user has at least Contribute rights on the site.

  • Check your site is in “Local Sites” or “Intranet” zone of the Internet Explorer.

3 comments

Hardit Singh Sep 30, 2014
Thanks man. It helped me alot
Fredo Jul 12, 2016
Perfect, thanks
Arul Jun 6, 2017
Hi Can you pls. help on this issue...Suddenly i am getting this error and it was workign before without any issue. "InfoPath cannot open the following form: http://test/sites/TeamSite/Lists/Announcements/Announcement/template.xsn Not enough storage is available to process this command." Recently i have changed my service account pwd( Could be was it a reason) if so how to solve this?

Leave a comment

Your comment is reviewed before it appears. Your name is shown with the comment; your email is required for moderation but never published.