Frantic Redirection SharePoint WebPart

Update to this article with SharePoint Solution (.wsp) file is available here!

A past customer called me today, frantically going nuts because they have a large MOSS deployment (~ 15,000 users) that was planned for production push out tomorrow, and needed a redirection strategy.

Eh, what? What the hell does a redirection strategy mean?

The problem with their sandboxed / user acceptance SharePoint environment was that although there were intuitive navigation controls, and a good navigation strategy supplemented by intuitive custom WebParts, some users were somewhat resisting the adaption of SharePoint, complaining it was over 2 clicks to get to what they wanted. Although I think that this is a rather stringent benchmark to get to the information that you require in an enterprise EIM system, he really needed a way to cut down on the clicks. The only real good part of the requirements is that a majority of users only went to certain site collections, rarely crossing collections, so it should be easy to redirect the users on entry to the portal to certain site collections, right?

It turns out, yes, it really wasn’t that difficult. Since I owed him a favor, I got started developing the SharePoint Redirector WebPart, which after gets tested tomorrow in production, I am going to release for free!

It works pretty simply. Basically, it takes an Active Directory operator (pretty much whatever you want since is a freeform text box property), something that exists in the user profile, and redirects based on whether that condition is met. Like if in my user profile I have the field squadron and in the squadron field, I met condition 101st SharePoint Squadron, I can be redirected immediately to or any other URL of my choosing. There is the provisioning in the WebPart properties to handle up to 10 redirections, and once I get the chance I will expand this to hold any number of redirections.

Administrators and general users don’t see the same thing, as administrators shouldn’t immediately be redirected if they met that profile operator, they still have to manage the root of the SharePoint implementation. Rather, they should see a small dashboard saying whether there are redirections conditions that have been setup, and the appropriate redirection parameters that are bound to those conditions.

The exception handling is pretty good, and will create a new event source in the event log, to a local .log file, and will output major errors to the screen. I use a standard exception handling class that I use for all WebPart development with it.

The Redirector WebPart Properties Toolpane

Global WebPart Settings

Redirection Settings

Condition Activation Management

Redirection Dashboard

Error Handling


22 thoughts on “Frantic Redirection SharePoint WebPart”

  1. Has anyone seen the following error and know how to fix it?

    I have installed in two different WSS 3.0 sites and still have the same problem.

    The “RedirectorWebPart” Web Part appears to be causing a problem. Could not load file or assembly ‘Microsoft.SharePoint.Portal, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. The system cannot find the file specified.

  2. The error that you are getting is because you are attempting to use the Redirector WebPart on a WSS site, whereas it requires SharePoint profiles, which is a feature of MOSS.

  3. What must one do to make this redirector usable on a WSS 3.x site??

    OR would you please modify it so it can work on WSS 3.x sites??

    Thank you, Tom

  4. Hi Adam – firstly thanks for taking the time to make this webpart available. This looks to be exactly what I’m after, I have a couple of questions…

    I saw in your other posts about this that you had a version available that could redirect based on group membership, but I couldn’t see where to download it – could you direct me to it (if it’s available) – thanks.

    Also, I’m potentially going to need to redirect to one of approx 60 sites based on group membership – did you ever make the changes you mentioned to cope with more rules?

    Any help you can spare would be very much appricated Thank you, Andy.

  5. Hello Adam,

    I’am very interested in your webpart if it will work with more then 100 sites. Is it possible to make one rule based on groupmembership and with variable parameter – like %group%. And after this, make use of scripts in the redirect to read the variable parameter, like: ‘if member of %group% then URL is ‘ …. ‘

  6. I have tried your redirector webpart, but when I install the webpart then add it to a page I get the following error: “The RedirectorWebPart appears t obe causing a problem. Request for the permission of type ‘,, version-, culture=neutral, publickeytoken=71e9bce111e949c’ failed. I have to use the webparts maintenance page to remove the webpart. Any ideas?

  7. Hello There,

    I had found your web part and musy say that it work grat on MOSS. I’m running it on the test site of the system and it does a great job.

    My only question is how can i get it to work on WSS 3.0.

    Do you have any ideas what have to be done to it.?

    Any info will be greatly apreciated.


  8. Hello,

    does this webpart works only with Active Directry or it can be used with FBA (forms based authentication)?

Leave a Reply

Your email address will not be published. Required fields are marked *