Utilities
The SharePoint 2007 (MOSS) environment can be termed a “platform” with a variety of opportunities for developers to add, extend and include custom functionality within the specific solution.
To assist the developer out there, I’ve created some utilities (one so far – another in “dev”) for help with the various XML and config files that are needed.
Refer to some of the articles (links above) for more intro/overview.
With the development of “WebParts”, there’s some confusion around how to “deploy” them – a few hoops to jump through, before being able to use within SharePoint. Click here for a 101 article about developing WebParts.
When deploying, the developer is required to “Add to Safe Controls” – a bit of a tedious approach, with checking Global Assembly Cache (GAC) for PublicKeyToken, and manually modifying the [web.config] file.
To assist with these few manual steps, I’ve created a new utility for use within the SharePoint world.
SafeControl Adder (SCA)
Click here for download link.
Instructions :
(1) Use Visual Studio to develop your WebPart with required code (logic) & User Interface (UI) – as you would normally do.
(2) Ensure you have a “Strong Name” assigned to your assembly (sn -> PublicKey)
(3) Build the project in Visual Studio
(3) Add the resultant DLL to the Global Assembly Cache (GAC) – using GACUTIL, or drag to C:\Windows\Assembly folder
(4) Open Safe Control Adder
(5) Choose the DLL from your project folder
(6) Choose the [web.config] for your SharePoint instance :
(7) Option : Create Backup. Will copy the existing [web.config] file, and save using date/time stamp
(8) Option : IIS Reset. Following the update to the [web.config], SCA can perform the required re-start of Internet Information Services (IIS).
The program will add the necessary entry to the web.config folder.
**NOTE : In order to use the control within SharePoint, you must “provision” the WebPart within the WebParts gallery.
Click Site Actions > Site Settings > Modify All Site Settings.
Under the list entitled “Galleries”- select WebParts.
Just need to tick the box for your newly added WebPart – and “Populate Gallery”
And when you go back to your Web Page, click “Edit Page”, and select to Add a Web Part.
Download SafeControl Adder :
License : Freeware.
Send me an email, or leave a comment if you find it useful, and what you’re developing within SharePoint (!)
Please let me know of any issues / bugs / problems / comments !
