There are hundreds of Web Parts available, but many will not be suitable to a Flex site as the functionality is already available inside Flex or is irrelevant to Flex environment. However, there are Web Parts that can provide added value and have been tested and approved for use within Flex. Speak to your Flex Consultant about these options.
We recommend that 3rd party web parts be tested on a test server prior to being installed on your live Flex system. A test license can be provided. Contact support@lookout-software.com.
3rd Party Controls
Web parts event activity calls SharePoint (via its object model/API). When it comes to 3rd-party controls, the 3rd party control has been set to NOT accept calls from other assemblies that are not-fully-trusted.
|
Flex calls <-> SharePoint <-> calls Third party control |
The assemblies (which include web parts) run under a security system where they can receive only the trust/permissions they require and should not exceed that in the case of a security risk.
For example, if there were some kind of security exploit in one of our web parts and someone decided to exploit that, for example they decide to change the server name (this is an just an example), the theoretical outcome would be that SharePoint (actually, the .NET runtime but it’s easier to explain using SP as they are tied together tightly) would step in and disallow the name-change operation UNLESS the web part had explicit permission to do so.
Now the usual thing to do is set up a web part to only use the permissions it needs. For the most part, our web parts use the standard trust level as they are not doing anything outside of SharePoint.
Exceptions are our CRMSideBar and CRMLicense web parts – both of these need to access the server name which requires an explicit permission to do so, (it’s accessed via the system Environment variables).
In the case of CRMSideBar, it lives in the Global Assembly Cache which has full trust. For CRMLicense, we set the permission needed during the install (it’s something set during the compilation of the code and creation of the WSP file).
For the web parts are considered “partially trusted” – in that they are running at the trust level necessary to function and do not require anything above that.
CRMLicence is still considered “partial trust” – just because it’s been given a permission higher, but it doesn’t mean it has full trust.
Many 3rd-party controls are set to NOT accept calls (merely getting a field based on one of these controls is considered a call) from an assembly/web part that does not have full trust.
Under this scenario we, the custom security policy needs to be changed to explicitly give the web parts affected full trust.
3rd Party Issues
If you have a 3rd party web part in place and are getting the following exception error when trying to run it with SharePoint Flex then proceed to the following instructions.
“That assembly does not allow partially trusted callers”
The error suggests that the Web Parts accessing the 3rd party control don’t have the required full permission and therefore, we need to grant full trust to these Web Parts in order to resolve this error. For this, the custome security policy needs to be changed to explicitly give the web parts affected full trust:The trust setting needs to be “WSS_Custom” in the web.config file.
<trust level="WSS_Custom" originUrl="" />
Find the line that defines what “WSS_Custom” is in the web.config file – it will point to a text file: (This is an example, yours will be slightly different)
Open this text file up in a text editor such as Notepad and find the “PermissionSet” attribute of the web part’s policy and modify by adding Unrestricted=”true”
For example, here is the default line for the “EditNewForm” web part:
<PermissionSet class="NamedPermissionSet" version="1" Description="WSPBuilder generated permissionSet" Name="CRMEditnewform.wsp-c61c05be-7b82-4b36-8c27-236857d740a0-1">
This needs to be changed to read:
<PermissionSet class="NamedPermissionSet" version="1" Unrestricted="true" Description="WSPBuilder generated permissionSet" Name="CRMEditnewform.wsp-c61c05be-7b82-4b36-8c27-236857d740a0-1">
Note the addition of Unrestricted=” true”
Save and retry to see if the error has gone away.
This needs to be done for all Web Parts that access the 3rd party control resulting in the exception error, which should be relegated to our Web Parts.
| In short the steps are:
1. Locate the ‘WSS_Custom’ text file in the Web.Config file. 2. Open this text file in Notepad and locate the ‘PermissionSet’ attribute and modify it by adding 3. Save and retry to see if the error is resolved. Do this for all Web Parts with this error. |