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:

  1. Jackbe.Sample.dll, our Web Part implementation(s)
  2. Jackbe.PrestoConnect.Net.dll, the Presto Connection for C# assembly
  3. 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.config so that the default trust level is set to Full, so that all Web Parts have full access to SharePoint resources. This is just a matter of locating the trust element in web.config and replacing the default trust level, WSS_Minimal setting to Full:
<trust level="Full" originUrl="" />

0
Your rating: None