Friday, June 23, 2006

Publishing Infopath 2007 documents in Browser

Infopath 2007 brings the new feature of rendering the infopath documents in the browser. However this feature can be slightly confusing for the beginners. When MOSS 2007 beta 2 was released I took me 2 days to find out how to render your own infopath document to browser.

The steps for this are below:

§ Complete the publishing wizard (using the SharePoint option) and publish the form to a shared location

§ Launch the SharePoint Central Admin page

§ Select Application Management

§ From the InfoPath Forms Services section select Manage Form Templates

§ Click Upload Form Template

§ Click the Browse button and navigate to the shared location where you published the form

§ Highlight the form and click Open

§ Click Upload

§ Assuming the template uploads successfully, you will be returned to the Manage Form Templates page. Click on the uploaded template and select Activate to a Site Collection

§ If the Site Collection box has the correct site, click OK. If not, click the site and you will be able to change to the correct site.

§ Once the activation has completed, you can now associate the form with a form/document library

§ Navigate to/Create a form or document library

§ From the Settings button, choose Form (Document) Library Settings

§ Select Advanced Settings

§ For “Allow Management of Content Types” choose Yes and click OK

§ You should now see a new section called Content Types – click “Add from existing site content types”

§ Drop down the box and choose Microsoft Office InfoPath

§ From the “Available Site Content Types”, highlight the form you activated, click Add and then click OK

§ Test!


Mail me your comments and suggestions.

kick it on SharePointKicks.com

39 comments:

Anonymous said...

Hi Madhur,
I tried the steps you suggest, but when I click the button "New" on the form I just published, in a new form library in which I have activated it, after a while I get the error "There has been an error while loading the form. A required resource could not be downloaded. To try to resume the download, refresh the page."
Do you know anything about this? Maybe it's because I didn't choose the "complete" installation of MOSS 2007 at the very beginning and some component is missing?
thanks

Madhur said...

Hi

It doesnt seem to be installation error.
Check your xsn file , does it include external images or
references external xml files as data source.

As a test, try to do these things
* Try to open the form in client->you can change the form library settings to force
it open in client.

* Try to build a very simple form and try rendering it in browser.

See if it works.

Anonymous said...

hi again
the form I was trying it's a completely new fresh simple form built in Infopath 2007 on the client machine (where Office 2007 Pro beta 2 is installed), with only a standard infopath textbox! no other controls or data attachments are involved...
Maybe I need to install Infopath 2007 on the server too, since it says it misses some resources?
The only other configuration notice I didn't mention is that client and server are running in virtual PCs...

Madhur said...

hi
You dont need infopath client to display infopath forms in browser.
* Check that forms server service is running...

* Try to redeploy the form. Make sure that you are pointing to correct location.

Anonymous said...

I deploy it to the Sharepoint central administration port of the server, it's the only site that Infopath client allows me to publish to...Is it correct or I should try to publish to the port of the web application/site collection where the form is going to be displayed?

Madhur said...

Thats the mistake...
You should publish to port where the form is going to be displayed...

For further communication please use my mail id madhur.ahuja@wipro.com

Anonymous said...

Hi, Nice blog by the way, it is helpful, Im having the same issue as Hybraz, I have tried publishing my simple form to different site collections on my server with the same result. Im starting to think this is bug, I wonder if Hybraz ever got his problem figured out. I have scoured the internet for a resolution for this problem. I guess that is the challenge with using Beta software with very limited or no support.

thanks for your help

Madhur said...

This is the reply from guy who was having same problem...
Go to Services in Administration Tools of the Control Panel...and...see that "Windows Sharepoint Services Administration" service should be started and not set to manual.

Anyway, after all this hard sweating it seems that publishing from infopath to the root site collection (the http://win2003office:47990) now works, and I was able to get my form rendered in a browser on a network client where there's no Infopath installed. That's all I needed for now to go on!

Anonymous said...

hmmmm. the form is still not loading, Im starting to think I should reinstall, This would allow me to test the backup and restore utility in operations. Hopefully I find a resolution soon.

Izzy said...

Can you provide some help on how to get data connection libaries working with web based and client based InfoPath forms?

I created a form that has two drop-down based on SharePoint list. I can get the web based version of the form to work in SharePoint & IE but if I try to open it in Infopath I get the following error:

The query cannot be run for the following DataObject: Job Codes
InfoPath cannot run the specified query.
The specified data connection file is not from a Data Connection Library.

I figured out I needed to convert my data connection to be stored in a DCL and figured out how to create a DCL on the site the form is in. The conneciton option is currently set to "Local data connection libary" and I am guessing I need to have it set to "Centrally managed connection libary" but can't figure out where this libary is in SharePoint.

Thanks

Anonymous said...

I ran into the 'Resources' issue when trying to create a new document based on an InfoPath form on a system without InfoPath. I finally figured out the problem: I hadn't created a site collection at the root of the server (I had created it under the 'sites' collection). I think the reason that this is necessary is because the web service to determine if a form can be run in the browser hangs off of the root site collection. Since the collection didn't exist, it couldn't be verified. As soon as I created site collection at the root, I was able to run the InfoPath form in the browser. Hopefully, this will help someone else. Thanks, Madhur, for your great post! I wouldn't have gotten this far without it!

Gary

Unknown said...

I've tried activating my form template to a site of which I am the administrator. (This after a successful upload of course)

However, I keep getting this error:


"The form template could not be activated to the following site collection: http://myserver:myport. You do not have the permissions required to perform this operation. Only the administrators of this site collection can activate to the site collection. Either add yourself as a site collection administrator, or have a site collection administrator activate the form template."


Any tips?

Anonymous said...

Hi all,
I had the same problem and this is the way i solved it.

I created a different host header in iis and created an alternate access mapping on port 80 ie http://workflowdemo instead of http://server:200

The forms service must not like the extra port number at the end!.

Hope it helps someone out there.

Sergio Otoya
Winapp technology

Keviv said...

After Enabling Form Authentication in my Sharepoint 2007, i'm successfull login and do process.
When i try to publish my infopath forms it says "the following web server does not appear to be running windows sharepoint services 'site name with port number'"

Jay said...

I have the same problem with activating form template to site collection as well. I don't think the port number is causing the problem since I have done it before using same port. MOSS just became crazy lately and I don't know why

Anonymous said...

Hi Guys,
This is the best blog i found for this error. Hope any one can help me. This is what I did and trying to do now.
Since InfoPath WebBrowser doesnt support code behind so I design the form in Desgin mode and the I uploaded the template via central admin. Configured the content type on document library so form library could read the form.All this worked fine. But now when I am trying to publish it to the production site I and getting this error "There has been an error while loading the form. A required resource could not be downloaded. To try to resume the download, refresh the page."
I even created the simple form with 2 feild on it and same issue.

Please let me know if someone has the answer.
Thank You

Madhur said...

Hi
Actually your statement that browser forms cannot have code behind is wrong ... browser forms can have code behind ...

so i ll suggest you to redesign your solution ....

Anonymous said...

Hi Madhur
Thank You for your response. Actually this is what I am doing so far.Just created a simple form with two text fields in it if i can publish that I can publish the other form also. I have followed you direction in you article which i was doing b4 also.
This is where i get the problem:
Once I try to open the form it is throughing the error
"There has been an error while loading the form. A required resource could not be downloaded. To try to resume the download, refresh the page."
So what I have found out so far is that this is Site collection Issue some where beacuse i am able to open form on one server but not another even though settings are same. I was wondering if you have any instruction on how to set up site collection? It will be great help.
Thank You
Daastan

Madhur said...

I've come to the same conclusion that publishing InfoPath forms to a forms
based server won't work since you are publishing with a windows credential,
but a forms based server doesn't know who you are... ie, different
authentication scheme

When I try to publish an InfoPath form to a forms library on a server using
forms authentication, I get an error:
"InfoPath cannot find the URL https:://sitename/docs/MyFormLibrary Make
sure that the web server name is valid, that your proxy settings are correct,
and that you have the necessary permissions to publish."

To work around this, I have a .bat file to manually install the .xsn file
using STSADM - o uploadformtemplate. From there, I can add the form as a
content type to my library. However, trying to launch the form still doesn't
work. A collegue moved his InfoPath form to a web part and that seems to
work. I'll try that today...

Sorry no answer, but i hope what I have done might help...

Anonymous said...

Hi Madhur
I appriciate you help. I tend to agree witj Serigo that Form are not good on site collection if we are using port number.I think it because of the web services.To check this try publishing the form on personal sites and port 80 it will work fine but other port it wont. I am doing the same. Once done I will let you know what exactly the issue is.
Thank You and keep the good post coming

Kelvin Liu said...

I have exactly the same problem. This is the only place on internet talks about it. Please let me know if anyone find a solution. Thx.

Anonymous said...

Hi Kevin
were you able to fix the problem let me know. If yo need need help. This is actually what i did to fix my problem, I restored my site on port 80 and then all sub site underneath port 80 and they seems to fall under root collection and i was able to run the InfoPath form. I had suffered alot because of this. Let me know if i can be anyhelp.
Thank You
p.s anonymous in previous blog is also me.

Kelvin Liu said...

hi Daastan,
Thanks a lot! It did work. I tried publishing the form to //personal site and it works there.

But now the problem is how can I move my application on other port to port 80? Currently //personal/ is on port 80. I don't want to lost any data. Any idea?
thanks.

Anonymous said...

Hi Kelvin.
sorry for delay response. To move your page to other site, I am not sure if you can save your personal page as a site template. If you can then do folowing:
1) Take a site template backup of your site. Save it as .STp file.
2) Create a sub site under port 80 such http://servername/site/XYZ.
3) restore you template on newly created site.

I think best option will be to just create new site under port 80. The newly created site will be part of site collection and you will not have any problem.
Let me know if this helped. For other help you can email me but let me ask Madhur first, If i am allowed to give out my email ID since this is his blog?

Madhur:
Please let me know if it ok with you.
Thank You

Madhur said...

yes daastan .. its OK with me .. go ahead ...

Unknown said...

Hi,
Any idea why "This form has been closed" error is displayed when a Infopath application which is a web enabled displayed?? Why and what could cause this message to be shown some times. After few hrs the error is not seen !!
Thanks in advance..

Unknown said...

Hi,,
How can I focus to a control during form load of InfoPath form (web enabled) or while the page gets refreshed or postback to server?
I noticed, the pointer get selecting the last control worked upon by the user. (checked with SelectText and SelectNode method, and does not suppored in web enabled forms)..

Anonymous said...

Have you ever considered hosting your applications on fresh servers with fast connection speeds?

mention blogger.com and receive an extra 10% off or a free month

cheap dedicated servers

Anonymous said...

hdemS6 Hello! Great blog you have! My greetings!

Anonymous said...

PNUcTV Your blog is great. Articles is interesting!

Anonymous said...

vAD9ec Please write anything else!

Anonymous said...

Magnific!

Anonymous said...

Wonderful blog.

Anonymous said...

daastan,

How do you restore a sharepoint site?

Anonymous said...

I am receiving the following error when opening an infopath form in sharepoint on a browser:

"There has been an error while loading the form. A required resource could not be downloaded. To try to resume the download, refresh the page."

There are no data connections. I have followed the publishing and deployment procedure with much keen interest; however i haven't succeeded in resolving the error.

Can anyone assist in resolving this error? I'll appreciate.

Unknown said...

Hi Daniel,
I was wondering if you were able to resolve your issue. It happens to me too with the same error msg.
I can publish the form just fine, but users can only access it once and then "There has been an error while loading the form. A required resource could not be downloaded. To try to resume the download, refresh the page."
Thanks,
Dmitri

Luis Enrique said...

Daastan, could you please explain a little bit the steps for fixing the problem? I getting the same error. I published my InfoPath form to my site http://MySite/ and store the form template under http://MySite/FormServerTemplates/MyInfoPathForm.xsn
I'm using it on a site inside MySite. If I open the form on the server it loads fine in a web browser, but if I open it from a remote browser the error appear.
Thanks in advance.

Luis Enrique said...

Hi people. Daastan, could you please explain the steps for fixing the problem? I'm getting the same error.
I'm publishing the infopath form as a Content Type to http://Mysite
and storing the Form template on http://MySite/FormServerTemplates/MyInfoPathForm.xsn
If I open the form from the server it loads ok, but if I try to open it form a remote browser the error appear.
Thanks in advance.

Anonymous said...

To resolve the resources issue, try adding an entry to the hosts file on the server, eg.

192.168.1.1 http://thewebsite.com
It fixed it for me