• Grumpy Wookie

    View Chris OConnor's profile on LinkedIn

  • Archives

  • Top Posts

  • Flickr Photos

    4780_113082538658_784073658_2905444_7437417_n

    4780_113082533658_784073658_2905443_6843979_n

    4780_113082528658_784073658_2905442_8369531_n

    4780_113082523658_784073658_2905441_776992_n

    4780_113082518658_784073658_2905440_3601069_n

    4780_113082513658_784073658_2905439_2663807_n

    More Photos
  • Recent Visitors

  • Blog Stats

    • 181,814 hits

SharePoint

There are many, many articles to be found on this blog.   SharePoint is my main area of work (daytime) – and a lot of testing+play (nighttime). 

My specialty is with regard to SharePoint “publishing” sites, but have worked on and implemented many other solutions covering document management, collaboration and workflow, portals, team sites and so forth.

Hopefully you’ll find something useful – everything from code snippets & examples – to simple re-posts from Microsoft, or other blogs – as well as some free utility bits & pieces – starting with the SCA.

Utilities :

Tutorials, code samples & tips :

Extra Material (ramblings, thoughts & other articles) :


Utilities  – Overview

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.

WebParts -> SafeControls

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.

sc1

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 :

sc2

(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”

7

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 !

9 Responses

  1. [...] Chris O’Connor has released a great little utility (SafeControl Adder) that makes deploying web parts to SharePoint environments a little easier. [...]

  2. [...] Chris O’Connor has released a great little utility (SafeControl Adder) that makes deploying web parts to SharePoint environments a little easier. "…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. [...]

  3. the download link doesn’t work???

  4. Sorry about that – have updated the link.

  5. Hi Chris,

    Are there any plans to release the source code for this utility?

    Thanks,

    Daniel Brown

  6. [...] herramienta para utilizar al momento de hacer el Deploy de componentes para SharePoint es SAFEControl Adder, la cual, afortunadamente es [...]

  7. I have a question about Feature element manifests. Is there any information on Elements.xml schema. I’m not sure which tags are needed or what each one is for. Could you clarify on the structure of Elements.xml? Thanks.

  8. hi,

    Thank you to provide this tool.
    Can I obtain the source code of this tool to modify it for some other purpose.

    hitechpriyan

Leave a Reply