Error on Submit - InfoPath Dev
in

InfoPath Dev

Error on Submit

Last post 10-02-2014 12:54 PM by klink. 21 replies.
Page 2 of 2 (22 items) < Previous 1 2
Sort Posts: Previous Next
  • 10-01-2014 05:46 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Okay, back on track.  Started over.  Form comes up with data, but on SubmitToSharePointList getting this:

    Access denied.  You do not have permission to perform this action or access this resource.

    Since I'm a site administrator, I don't know what I don't have access to.  =(  Any thoughts?

    I did see this post, which doesn't look good.  =(

    I also saw this:  "Data connections for browser forms should be converted to UDC files."  I have not done that.  Should I??

  • 10-01-2014 07:02 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99
    klink:

    Okay, back on track.  Started over.  Form comes up with data, but on SubmitToSharePointList getting this:

    Access denied.  You do not have permission to perform this action or access this resource.

    Since I'm a site administrator, I don't know what I don't have access to.  =(  Any thoughts?

    I did see this post, which doesn't look good.  =(

    I also saw this:  "Data connections for browser forms should be converted to UDC files."  I have not done that.  Should I??

    I converted the SPSubmit to a UDC file.  Still getting the same error.  Should I convert the "Retrieve" data connections also?  (There are a lot of them, so don't want to unless I have to!)

  • 10-01-2014 07:54 AM In reply to

    Converting the working, retrieve data connections to UDCX shouldn't impact this.

    Is the form still working in preview / filler?

    Is the form still admin deployed?

    Do you still have useWebServices getting set to true on the qRules finishedLoading node?

    Hilary Stoupa

  • 10-01-2014 08:48 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Is the form still working in preview / filler?  Yes

    Is the form still admin deployed?  Yes

    Do you still have useWebServices getting set to true on the qRules finishedLoading node?  Yes

    Interesting Note:

    I uploaded two separate forms. 

    1. Submit as UDC
    2. Submit not UDC

    Results from developer:

    1. From Submit as UDC:
    2. Failed to get SPGroupName from GroupID. Error Message: Group cannot be found. Callstack:
      at Microsoft.SharePoint.SPGroupCollection.GetByID(Int32 id)
      at Microsoft.SharePoint.WebControls.PeopleEditor.set_SharePointGroupID(Int32 value).
       
      Batchmgr Method error. Errorcode: 0x2ac7aa00. Error message: Access denied. You do not have permission to perform this action or access this resource.
       
    3. From Submit without UDC:
    4. Batchmgr Method error. Errorcode: 0x2ac7aa00. Error message: Access denied. You do not have permission to perform this action or access this resource.
       

    Don't know if this rings any bells. I think the "Failed to get SPGroupName" we have gotten before and resolved with this:

    As is generally best practice, your data connection file should be exported to a Universal Data Connection File (.udcx) file and saved to a Data Connection library in SharePoint. By default when you export a udcx file you get the following at the bottom

    <!-- udc:Authentication><udc:SSO AppId='' CredentialType='' /></udc:Authentication
      --> 
    


    This means we're not specifying any authentication and trying to use the current user's permission. However, I believe there's a double hop issue when trying to connect to UserProfileService.asmx and SharePoint is using nt authority\iusr. We need to provide a specific account to connect to the web service as. I created a secure store application ID called InfoPath and my data connection file now has this entry

    	  <udc:Authentication>
    		<udc:SSO AppId="InfoPath" CredentialType="NTLM" /> 
    	  </udc:Authentication>
    

    Finally, instead of calling a method on UserProfileService.asml with no parameters and getting the current user by default, you have to be explicit about what user you're querying for. Stop the data connection from connecting automatically on form load and add a form load action with two steps

    1. Set the query parameter in the web service call to the current user using concat("domain\",username())
    2. Query the data connection
  • 10-01-2014 09:12 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99
    OMG!!!!!  I can't believe it!  Changing the UDC file FIXED THE PROBLEM!!!! 
  • 10-01-2014 09:22 AM In reply to

    Hey, great news!

    Hilary Stoupa

  • 10-02-2014 12:54 PM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Just a follow-up on what I think caused the problems.  It seems that the site I was deploying this form to is claims-based, which is what was causing a lot of the permissions errors.  Too bad the developer didn't think of that earlier.  =/ 

    Steps:

    1.  Error:  "Error ocurred submitting data to list: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed."

    Changed trust level in application web.config file system.web section: <trust level=”WSS_Medium” originUrl=”” />

    2.  Error:  "Error ocurred submitting data to list: Request failed."

    Added a rule on the QdabraRules data source finishedLoading attribute to set the useWebServices attribute to true. You'll want a condition on the rule - if finishedLoading = true, set useWebServices to true.

    After figuring out that I couldn't deploy the form from Central Admin (and instead had to do it from "Site Collection Features"),

    3.  Error:  "Access denied. You do not have permission to perform this action or access this resource."

    Converted SPSubmit to a UDC file.

    4.  Still getting error:  "Access denied. You do not have permission to perform this action or access this resource." 

    5.  Errors behind the scenes:

    Failed to get SPGroupName from GroupID. Error Message: Group cannot be found. Callstack:
    at Microsoft.SharePoint.SPGroupCollection.GetByID(Int32 id)
    at Microsoft.SharePoint.WebControls.PeopleEditor.set_SharePointGroupID(Int32 value).
    Batchmgr Method error. Errorcode: 0x2ac7aa00. Error message: Access denied. You do not have permission to perform this action or access this resource.
    Noticed that we had gotten Failed to get SPGroupName from GroupID before.  Was also told by developer that this a was claims-based site.  Resolved by doing the following (got this from this article: Using UserProfileService.asmx and UserGroup.asmx with an Infopath form.  You have to go way down to the second reply by Peter87):
    <quote>

    As is generally best practice, your data connection file should be exported to a Universal Data Connection File (.udcx) file and saved to a Data Connection library in SharePoint. By default when you export a udcx file you get the following at the bottom

    <!-- udc:Authentication><udc:SSO AppId='' CredentialType='' /></udc:Authentication
      --> 
    


    This means we're not specifying any authentication and trying to use the current user's permission. However, I believe there's a double hop issue when trying to connect to UserProfileService.asmx and SharePoint is using nt authority\iusr. We need to provide a specific account to connect to the web service as. I created a secure store application ID called InfoPath and my data connection file now has this entry

    	  <udc:Authentication>
    		<udc:SSO AppId="InfoPath" CredentialType="NTLM" /> 
    	  </udc:Authentication>
    

    Finally, instead of calling a method on UserProfileService.asml with no parameters and getting the current user by default, you have to be explicit about what user you're querying for. Stop the data connection from connecting automatically on form load and add a form load action with two steps

    1. Set the query parameter in the web service call to the current user using concat("domain\",username())
    2. Query the data connection</quote>

    6.  SUCCESS!!

     
Page 2 of 2 (22 items) < Previous 1 2
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.