Creating a List Mashlets Web Part using Presto Connector for C#: Example 2
We follow a similar deployment procedure to Mashlet View Web part, except in this case we also have a few dependent Assemblies to deploy and we need to configure the SharePoint server to allow the Web Part to access Sharepoint Server Web Resources, see Microsoft Windows SharePoint Services and Code Access Security for more details.
The 3 Assemblies to deploy are:
- Jackbe.Sample.dll, our Web Part implementation(s)
- Jackbe.PrestoConnect.Net.dll, the Presto Connection for C# assembly
- NetServ.Net.Json.dll, a lightweight library for handling JSON notation written in C#
The Assemblies should be copied to:
C:\Inetpub\wwwroot\wss\VirtualDirectories\port number\bin
Add a Safe Control entry in web.config for the new Web Part:
<SafeControl
Assembly="Jackbe.Samples, Version=1.0.0.0, Culture=nuetral, PublicKeyToken=null"
namespace="Jackbe.Samples"
TypeName="MashletsListView"
Safe="True"
AllowRemoteDesigner="True"
/>
Finally we need to configure the SharePoint Server to allow the Web Part to connect to the Presto Mashup Server. We have 2 options, one simple one not so simple:
- The simple option is to update
web.configso that the default trust level is set toFull, so that all Web Parts have full access to SharePoint resources. This is just a matter of locating thetrustelement inweb.configand replacing the default trust level,WSS_Minimalsetting toFull:
<trust level="Full" originUrl="" />
- The not so simple option is to set up a custom security policy for your SharePoint Site, as documented here, Setting the Trust Level for a Virtual Server, and outlined below.
- Login or register to post comments
- Email this page










