Infopath 2010 forms stops working after updating installing SharePoint Server 2010 cumulative update package (April 2011) RRS feed

  • السؤال

  • Hi All, I guess this should be considered a bug, since perfectly valid code actually stops working.

    This is the way to reproduce it:

    Create an infopath form and create a textfield with a default value = userName()

    Then if you deploy the form on a sharepoint form library it should display your username in the textfield.

    However, if you add some custom code to the form (for example something inside FormEvents_Loading) then the form will stops working and in the ULS log you'll see something like:

    Microsoft.SharePoint.UserCode.SPUserCodeSolutionProxiedException: Could not load type 'Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager' from assembly 'Microsoft.SharePoint, Version=14.900.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.    Server stack trace:      at Microsoft.Office.InfoPath.Server.SolutionLifetime.UserHost.GetCurr... 8d1e2a51-b9ff-4a7f-9a71-f03456810d20
    06/07/2011 10:36:18.83* SPUCWorkerProcess.exe (0x1E2C)           0x0584 SharePoint Foundation          Sandboxed Code Service         fe8s Medium   ...entUserAccountName() 

    And this is due to the fact that the April 2010 update package adds supports to the Claims based authentication, and so the

    Microsoft.Office.InfoPath.Server.SolutionLifetime.UserHost.GetCurrentUserAccountName() (which is called because of the userName() formula)

    has a further check to se if the username is encoded. But for doing so it uses the SPClaimProviderManager class that is NOT available in sandboxed code!

    It seems to me that this is a bug: they should either have left the above method untouched, or they should have included the SPClaimProviderManager in the sandboxed code.

    The best solution I found was to revert to the old assembly in the GAC.

    05/رجب/1432 10:52 ص

جميع الردود