InfoPath cannot connect to a data sources when Opened in a browser - InfoPath Dev
in

InfoPath Dev

InfoPath cannot connect to a data sources when Opened in a browser

Last post 09-13-2011 11:33 AM by SurajShetty. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 12-30-2008 03:51 PM

    InfoPath cannot connect to a data sources when Opened in a browser

    We have a form with two data connections that recieve data. One of them is "getuserprofilebyname" found in the SharePoint UserProfileService.asmx file. The second data connection is to our HRIS system. This is a separate database on a separate box. I have created the stored procedures and the webservice myself. I can consume that webservice while using info path, I am also able to convert the dataconnections into a SharePoint data connections library and approve them. I then publish the form to a form library and am still able to open the the form in InfoPath - however when I change the document library to open the form in a browser I get the error "6932 canot connect to the datasource..."  here is the exact text

    An error occurred accessing a data source.

    An entry has been added to the Windows event log of the server.

    Log ID:6932"

    We have checked the following:

    • Allow users to browser-enable form templates

    • Render form templates that are browser-enabled by users

    • Allow embedded SQL authentication

    • Allow user form templates to use authentication information contained in data connection files

    • Allow cross-domain data access for user form templates that use connection settings in a data connection file

    We are running MOSS2007 enterprise and have FormsServices enabled. We have successfully published one form already, that form only consumes the getuserprofilebyname web service provided by SharePoint. 

    Please, please please help!

    Kyle

  • 01-02-2009 03:47 PM In reply to

    Re: InfoPath cannot connect to a data sources when Opened in a browser

    Just a quick update - we ended up creating a custom list in SharePoint with the data that comes from the database table we were attempting to use. Then we modified our form to pull from the custom list and voila - all is well in the world again. If someone out there has a better solution, I'm all ears as I'm sure our first solution to create a SQL2k5 web service really should have worked as expected.

  • 01-15-2009 08:06 AM In reply to

    Re: InfoPath cannot connect to a data sources when Opened in a browser

    I want to provide more detail to this, so as to perhaps generate more interest and possible solutions. 

    1. Our environment is this: We are under one AD domain and there are three servers involved. The first server is the Web Server for MOSS 2007, it uses a SQL 2005 database on another machine for it's content.  We have another 2k3 server with SQL 2k5 on it for this scenario. 

    2. I created a SQL 2k5 web service on the third machine as follows.

    CREATE TABLE DUFUS (FULLNAME VARCHAR(50)) -- JUST CREATE A TABLE

    --CREATE THE STORED PROCEDURE FOR INSERT INTO DUFUS

    CREATE PROCEDURE udsp_InsertNameIntoDufus

    @FULLNAME VARCHAR(20)

    AS

    INSERT INTO DUFUS

    (FULLNAME)

    VALUES

    (@FULLNAME)

    GO

    --CREATE THE STORED PROCEDURE FOR SELECTING FROM DUFUS

    CREATE PROCEDURE udsp_SelectNameFromDufus

    AS

    SELECT FULLNAME FROM DUFUS

    GO

    --CREATE ENDPOINT WEB SERVICE

    CREATE ENDPOINT SQL_DUFUSENDPOINT

    STATE = STARTED

    AS HTTP

    (

    PATH = '/DUFUS',

    AUTHENTICATION = (INTEGRATED),

    PORTS = (CLEAR),

    CLEAR_PORT = 80,

    SITE = 'or-viewpoint'

    )

    FOR SOAP

    (

    WEBMETHOD 'GetNameFromDufus'

    (NAME = 'Viewpoint.dbo.udsp_SelectNameFromDufus'),

    WEBMETHOD 'InsertNameIntoDufus'

    (NAME = 'Viewpoint.dbo.udsp_InsertNameIntoDufus'),

    BATCHES = DISABLED,

    WSDL = DEFAULT,

    DATABASE = 'Viewpoint',

    NAMESPACE = 'http://tempURi.org'

    )

    --just testing the stored procedure

    EXEC udsp_InsertNameIntoDufus 'YULE BRENNER'

    --just testing the stored procedure

    EXEC udsp_SelectNameFromDufus

     

    3. Create an InfoPath form to talk to this web service. It's just a very simple form, one label and one text box for a name

    Create the submit options by selecting Tools>>Submit Options and selecting the check box next to "Allw users to submit this form" and select "Web Service" from the drop down list. Click on "Add" to create your data connection.

    Create a submit to the URL.  In my case it's http://or-viewpoint/dufus?WSDL

    Select the InsertNameIntoDufus method.

    Map the fields

    Name it something and finish and close.  Time to test it in InfoPath in Design mode - click Preview

    Enter a Name and click and Submit

    Go back to SQL server just to make sure data was written.

    And it works as expected. 

    NOW - LET'S PUBLISH THIS FORM!!!!

    First we have to convert the data connection in InfPath to a data connections library in SharePoint.

    While your viewing your form in InfoPath (Design) select tools>>Data Connections and click on the convert button

    Insert the URL to the data connections library you have already created and give it a name

    Then navigate to your data connections library to approve the data connection

    Approve the Data  Connection and click on OK.

    Now the data connection is approved.

    Now we can publish the form to a new document library. Back in the Design mode of your infopath form you select "Publish Form Template" in the design tasks you then get the following:

    Select the first option, "To a SharePoint server with or without InfoPath Forms Services" and select next. Enter the URL to where you want to publish your form and select Next.

    Select Document Library and make sure the Enable this form to be filled out by using a browser is selected, click next

    We are going to create a new document library, hit next.

    Give it a name and click next

    Perhaps you want to view some columns in your SharePoint library, but we are not for this scenario, click next

    And finally, click "publish". When it's published, select close and open the document library.

    We have to modify the settings of the document library to open the form in a browser - in the document library, click Settings and Form Library Settings, then select Advanced Settings under the General Settings header, then select Display as a Web Page under the Browser-Enabled Documents section.

    Select OK at the bottom of the page and navigate back to your document library and select "New" this should open your form in a browser. Enter a name into the text field and click submit.

    You are now presented with an error. that simply say's "An erro occured while the form was being submitted"

    Why will it work in InfoPath and not in SharePoint? This is the conundrum. We have tried signing the form with a certificate and setting the domain level to full trust, but alas, the same result. Someone please tell me what's going on..

    Thanks - Kyle

    (*****I have a word document with screen shots if you are interestd*****) 

  • 02-10-2009 07:00 AM In reply to

    Re: InfoPath cannot connect to a data sources when Opened in a browser

    this did not produce the conversations I was hoping for.. but thought I should end this thread.  this is how we resolved the aformentioned issue.

    Office Single Sign-on Service

    To solve the problem use the Office Single Sign-on Service, there are two things to do.

    1.       Configure the Single Sign-on service

    2.       Configure the Data Connection file to use the SSO Service

     

    Step 1 – Configure the Single Sign-on Service

     

    Follow the steps outlined in this article:

    http://technet.microsoft.com/en-us/library/cc262932.aspx

     

    Step 2 – Configure the data connection file

     

    Assuming you’ve created a data connection file as outlined above, follow these steps to update it to use the single sign-on service.

    1.       Go to the SharePoint folder where the data connections are stored, download the data connection file

    2.       Alter the authentication section of the file to look as follows:

    <udc:Authentication><udc:SSO AppId='myApp' CredentialType='ntlm' /></udc:Authentication> Note: the AppId is the application name you created in the Manage Enterprise Application Definitions.  In Central Administration, goto Operations, Manage settings for single sign-on, then Manage Settings for enterprise application definitions.  In this window you should see an “Application” column.  That is the name you will enter as AppId.  In my test box, I had an application name ‘domainGroup’ so my authentication string will be as follows:<udc:Authentication><udc:SSO AppId='domainGroup' CredentialType='ntlm' /></udc:Authentication> Visit this website to see more information on the authentication section of a UDC file:http://msdn.microsoft.com/en-us/library/ms772017.aspx 

    3.       Upload the file back to the data connections folder and approve the connection.  Publish your Infopath form using that data connection and you are ready to go.

     

  • 02-10-2009 11:36 PM In reply to

    Re: InfoPath cannot connect to a data sources when Opened in a browser

    Hi K Thomas and welcome,

    I'm terribly sorry about the no response here. Dreadful! I will try to remedy this in the future. We do have a policy of replying to all threads within 48 hours. We failed you and for that I am sorry. Anyway, my guess is that you overwhelmed our crew here.

    SSO is indeed needed when your Web Service is on a different server. It sounds like you did everything by the book (creating UDCs, etc.). SSO can be a pain in the neck.

    Anyway, glad to hear you got it working. Let me know if you run into any other problems.

    Patrick Halstead
    Project Manager at Qdabra
  • 05-14-2009 02:40 PM In reply to

    Re: InfoPath cannot connect to a data sources when Opened in a browser

    Hi, I am struggling trying to get through the same issue. Do you notice anything wrong?

                  <udc:Authentication>
                             <udc:SSO AppId= 'MyNPLSSO' CredentialType= 'Kerberos'></udc:SSO>
                 </udc:Authentication>

    Your help is greatly appreciated!

  • 05-14-2009 02:59 PM In reply to

    Re: InfoPath cannot connect to a data sources when Opened in a browser

    your using both an SSO app and Kerberos. We were never able to resolve our issue using this method, so we are turning to the BDC. so far, that seems to work well.

     I'm sure this does not help, and I believe you are on the right path.. let me know if you discover anything else.

  • 05-14-2009 03:19 PM In reply to

    Re: InfoPath cannot connect to a data sources when Opened in a browser

    Could you point me in the right direction using and configuring BDC.

    Thanks!

     -Stephen

  • 05-14-2009 03:27 PM In reply to

    Re: InfoPath cannot connect to a data sources when Opened in a browser

    to use the BDC you must create and import a BDC application. to accomplish creating an applicatoin you can either use BDCMetaman (that's the one I use) or you can download and install the microsoft SDK for Sharepoint and use their tool, it's free, but not as intuitive as BDCMetaman.  Once you have created the application, you are able to import it using an option in SharedServices. when it's imported and security is set you are able to create a custom list on any site usin the application you imported.

  • 09-13-2011 11:33 AM In reply to

    Re: InfoPath cannot connect to a data sources when Opened in a browser

    This worked great! However, there was one other problem in addition. If you are using a select statement to query data from a database, and a given table has contraints (such as an ID column being Not Null) you HAVE to have those fields in your select statement, otherwise the DatabaseAdapter used internally will error out and throw another useless error. Had to dig in the server logs to find this one. Moreover, if the contraints change, then your query might potentially have to change (if a new required field is added) unless you wildcard it. thanks, suraj
Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.