Article ID: 981684 - Last Review: May 13, 2010 - Revision: 3.0 When you connect to a Web service by using an InfoPath 2010 form that contains sandboxed code, the data that is returned is incorrect, or you receive an error message
SYMPTOMSYou have a Microsoft InfoPath 2010 form template that has a data connection to a Web service. When you connect to the Web service, you encounter one of the following issues:
CAUSEAn InfoPath 2010 form template that contains sandboxed code is implemented by using SharePoint Foundation Sandboxed Code Service, which uses the SPUCWorkerProcess process instead of the W3WP process. When the form calls the Web service, InfoPath Forms Services delegates the request to the SPUCWorkerProcess process. This process cannot use the identity of the user who is filling out the form. Instead, the process uses the identity of the account that runs SharePoint Foundation Sandboxed Code Service. The account is specified by the farm administrator. Therefore, the Web authenticates are based on the identity of the SPUCWorkerProcess process. However, if the account that is specified by the farm administrator does not have access to the Web service, the error message occurs. Note InfoPath Forms Services tries to execute a request in the W3WP process when InfoPath Forms Services determines that no sandboxed code has to be run for a given request. However, if there are cascading actions that may cause sandboxed code to be executed, the request is delegated to SharePoint Foundation Sandboxed Code Service and to the SPUCWorkerProcess process. RESOLUTIONTo resolve this problem, use one of the following methods. Method 1 Redeploy the sandboxed form as an administrator-approved form. To do this, follow these steps:
Use the Secure Store Service in SharePoint Server 2010 to store alternate credentials for the data connection. Secure Store Service authentication works by storing a username and a password in an encrypted database. When InfoPath Forms Services requests Secure Store Service authentications on behalf of a user, Secure Store Service performs individual authentication or group authentication. For individual authentication, Secure Store Service verifies that the requested user has an entry in the Secure Store Service database. For group authentication, Secure Store Service verifies that the user is a member of a group entry. When the user is validated, Secure Store Service returns the appropriate credentials. Then, InfoPath Forms Services uses those credentials to impersonate the user. Therefore, the Web service sees that the user is specified in the Secure Store Service database even if the specified user is not the actual user. Note The following steps assume that the data connection in the form template uses a UDCX file in a data connection library. For more information about how to create and to use a data connection library in Microsoft Office SharePoint Server 2007, visit the following Microsoft Developer Network (MSDN) Web site: How to: Create and use a data connection library
(http://msdn.microsoft.com/en-us/library/ms772101.aspx)
To use Secure Store Service to store alternate credentials for the data connection, follow these steps:
States the credentials in the UDC file explicitly. To do this, replace the <udc:Authentication> section in the UDCX file by using the following code: STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top
