Posted 01/20/2010 - 18:26 by MiMi Levine
Having built the Web Part Assembly we will deploy it to the SharePoint bin directory, which is the recommended method of deployment.
Assuming a default Visual Studio 2008 installation, the dll should be:
C:\Documents and Settings\username\My Documents\Visual Studio 2008\Jackbe.Sample\MashletView\bin\Debug.
Assuming a default SharePoint installation, the destination bin should be:
C:\Inetpub\wwwroot\wss\VirtualDirectories\port number\bin
Finally, in order for SharePoint to recognise the new Web part as being safe to use, we must add a Safe Control entry in web.config for the new Web Part.
The web.config will be found in the bin parent directory:
C:\Inetpub\wwwroot\wss\VirtualDirectories\port number\web.config
Open the file with a text editor such as Notepad, locate the SafeControls section and add the following child element entry:
<SafeControl
Assembly="Jackbe.Samples, Version=1.0.0.0, Culture=nuetral, PublicKeyToken=null"
namespace="Jackbe.Samples"
TypeName="MashletView"
Safe="True"
AllowRemoteDesigner="True"
/>
Now we are ready to add the new Web Part to the SharePoint Web Part gallery.
- From your SharePoint Site homepage, select Site Actions->Site Settings
- In Site Settings, select Web Parts from the Galleries column, which will display the Web Part Gallery.
- Select *New to add a new Web Part, this will display a list of all available New Web Parts.
- Select the checkbox for the Jackbe.Sample.MashletView and click the Populate Gallery button, this will return you to the Web Part Gallery where you should see the new Web part listed asMashletView.webPart!NEW.

- The mashlet can now be added to any Web Part page. We could change the mashlet settings so that it appears in a new Grouping, by default it will appear under Miscellaneous Web Parts.
- Login or register to post comments
- Email this page
