SharePoint Blog – René Hézser

Display all my alerts

The "old" SharePoint Server 2003 offered the ability to display all alerts from a user on his/her MySite. MOSS and SharePoint 2010 lacks this functionality. So I wrote a Webpart, which will display all my alerts. Of course is multilingual. Currently there is English, German and Spanish language support included. And it will work on Windows SharePoint Services V3 as well ass SharePoint Foundation. You don’t need the Office Server / SharePoint Server 2010 for it :-)

You can configure which columns shall be displayed, and if you want to see all alerts from all websites within your SharePoint farm.

The Webpart will iterate through all websites, and look if there are alerts for the current user. You can then modify the alerts, or navigate to the corresponding website and list by clicking on the appropriate entry in the context menu of the alert.

To install this Webpart, install and deploy the solution via stsadm:

  1. stsadm -o addsolution -filename RH.MyAlerts.wsp
  2. stsadm -o deploysolution -name RH.MyAlerts.wsp -immediate -url http://yoururl

Instead of deploying the solution using stsadm, you can deploy it in the central administration of your farm.

Creating the solution wsp file is very easy, if you use the WSPBuilder.

Download the solution.

Download the source code for the Webpart.

(Please set the trust level of your web.config to ‘Full’!)

Keywords: SharePoint, alert, all my alerts, benachrichtigung, alle meine benachrichtigungen anzeigen

Update 16.12.07
I fixed an error and the Multilanguage support is back

Update 12.05.08
Another small update. Handling search alerts is improved and the assembly will not install in the GAC (Global Assembly Cache) to get rid of the FullTrust setting in the web.config.

Update 11.06.08
This update deals with the problem that SPContext.Current.Web.CurrentUser is sometimes null.

Update 31.08.08
The Webpart does now include an update check in the Webpart properties.

Update 01.10.08
A small bug fix update.

Update 26.10.08
I have implemented Spanish localization.

Update 08.11.08
A small update to 1.0.4.0 with bugfixes

Update 22.07.09
HtmlDecoding for the GroupBy field value (the title for webs)

 

Update 1.9.09 – Version 1.0.6.0
Fix to prevent Access Denied e.g. for SSP Sites.

Update 20.12.2011 – Version 1.1.0.0
Small update to improve SharePoint 2010

52 comments for “Display all my alerts

  1. 19th November 2007 at 12:01

    great solution!

  2. 20th November 2007 at 19:39

    Hallo und danke für das Webpart.

    Ich habe es eben installiert und deployt und das Feature in der Site-Collection aktiviert. Soweit alles fein.

    Wenn ich das Webpart aber auf einer Seite hinzufügen möchten bekomme ich den Fehler:

    “Die ausgewählten Webparts können nicht hinzugefügt werden.

    My Alerts: Cannot import this Web Part.”

    Ist nur das eine angekreuzt..
    Ideen?

    a.rode at de.bernstein.eu

    Danke!

  3. 18th December 2007 at 15:52

    I have the same problem as a.rode

    Steven

  4. 18th December 2007 at 19:18

    Hi Steven,
    could you please go to your Webpart catalog and post or mail me the .webpart xml file?
    I can not think of any problem, which might prevent you from adding it to a page :-(

    René

  5. 15th January 2008 at 13:53

    Dear René,
    I Also tried to use your webpart but also couldn’t import it !!, the following is the .webpart xml file :

    < ?xml version="1.0" encoding="utf-8" ?>




    Cannot import this Web Part.


    MyAlerts


  6. 18th January 2008 at 22:18

    Hi René,
    First of all, I want to thanks you for this great solution. I have two questions:
    – I’ve got your source code and I compiled it, but when I try to deploy manually in the bin directory I got this error:
    “The type specified in the TypeName property of ObjectDataSource ‘ItemDataSource_’ could not be found”
    Do you know what is goning on?

    – The second question is that this webpart isn’t work for search alerts, is it?

    Thanks you,

    Darío

  7. 20th January 2008 at 10:39

    Hey Rene.
    I tried to use it too and have the same problem as Steven and rode.
    did you find any solution for it?
    .webpart xml file looks fine.
    Thanks for the WP anyways :)

  8. 14th March 2008 at 18:04

    I have the same problem like a.rode.

    Is there any information about deploying it?

  9. 21st March 2008 at 19:44

    Hi, when I try to “stsadm -o addsolution” I get “Object not set to an instance of an object” error.

    Are you sure you have the right file?

  10. 17th April 2008 at 18:18

    I have the same problem as a.rode and Steven.

    Did somebody ever found a solution for this?

  11. 18th April 2008 at 21:20

    Quote:
    Dear René,
    I Also tried to use your webpart but also couldn’t import it !!, the following is the .webpart xml file :

    < ?xml version="1.0" encoding="utf-8" ?>




    Cannot import this Web Part.


    MyAlerts


    —————————————————
    Sry for the delay!
    What is your trust level in your web.config? Do the SharePoint logs give more information? Usually they have better error messages than the browser if adding a Webpart fails.

    René

  12. 18th April 2008 at 21:27

    Quote:
    Hi René,
    First of all, I want to thanks you for this great solution. I have two questions:
    – I’ve got your source code and I compiled it, but when I try to deploy manually in the bin directory I got this error:
    “The type specified in the TypeName property of ObjectDataSource ‘ItemDataSource_’ could not be found”
    Do you know what is goning on?

    – The second question is that this webpart isn’t work for search alerts, is it?

    Thanks you,

    Darío

    ———————————————–
    Hi Darío,
    this problem occures if you deploy the assembly (dll) to the global assembly cache instead of the bin directory of the web application. Please doublecheck you don’t have a version of the dll in your GAC, since it would be used instead of the bin folder assembly.

    Uhhh. I honestly don’t know if it works for search alerts. I will look into this.

    René

  13. 20th April 2008 at 11:13

    Quote:
    Hi, when I try to “stsadm -o addsolution” I get “Object not set to an instance of an object” error.

    Are you sure you have the right file?
    ————————————————
    Hi,
    you have to specify the file which you want to import “stsadm -o addsolution -filename RH.MyAlerts.wsp”

    René

  14. 28th April 2008 at 17:31

    Hallo,

    ich kann leider nicht eingrenzen, z.B. wenn ich sage zeige mir nur Zeitpunkt und Liste an. Er zeigt trotzdem immer alles an.
    Jemand eine Idee?

    Gruß

  15. 28th April 2008 at 17:45

    Hallo Rene’.

    Sorry aber meine erste Message kannst du vergessen, der Sharepoint Server war wohl eingeschlafen. Nach ca. 15 Minuten war auch alles wie gewünscht sortiert.

    Gruß

    Christian

  16. 21st May 2008 at 12:16

    Hallo,

    wollte nur ein positives Feedback geben: Habe das Webpart installiert und es funktioniert. Vielen Dank!
    Habe mich lediglich zunächst stark gewundert warum es in den SiteCollectionFeatures ist (und nicht auf SiteFeature Ebene aktiviert werden kann…)

    Grüße,

    Johannes

  17. 21st May 2008 at 13:48

    Hallo Johannes,
    das freut mich zu hören.

    Zur SiteCollection:
    Webparts werden in den Webpart Katalog auf der SiteCollection installiert, nicht auf der jeweiligen Site. Deshalb findest du das Feature dort.

    Gruß
    René

  18. 27th May 2008 at 19:56

    Hi René, thanks for sharing this WP!!!

    I have the same problem importing the webpart as Steven and a.rode.

    My xml looks like the others posted here, and the error message is the same.

    In log, there are two rows registering the error:

    Error importing WebPart. Assembly RH.MyAlerts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b695fcac4a3efe33, TypeName. RH.MyAlerts, RH.MyAlerts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b695fcac4a3efe33

    and…

    Failed to add webpart http%253A%252F%252Fserver%252F%255Fcatalogs%252Fwp%252FMyAlerts%252Ewebpart;My%2520Alerts. Exception Microsoft.SharePoint.WebPartPages.WebPartPageUserException: Cannot import this Web Part. at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections) at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb) at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, SPWeb spWeb) at Microsoft.SharePoint.WebPartPages.WebPartQuickAdd.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

    Do you have a clue of what’s happening?

    Thank you anyway!!!

  19. 27th May 2008 at 21:01

    Would you please stop posting the same comment over and over again!

  20. 27th August 2008 at 00:22

    Hello, nice site look this:

    End ^) See you
    Nice site!
    Good.
    Cool.

  21. 12th September 2008 at 22:53

    I have the same problem importing the webpart as Steven and a.rode.

  22. 18th September 2008 at 21:45

    Hello

    I have deploy web part successfully, but facing problem importing the webpart

    My Alerts: Cannot import this Web Part.”

    Please suggest me whats wrong I am doing wrong?

  23. 20th September 2008 at 22:01

    Hi René,

    Your alerts webpart looks excellent (and from the screenshot, better than many of the commercial ‘paid-for’ webparts).

    Currently I’m having the same problem as most that have commented above (I.e. the ‘Cannot import this webpart’).

    I have tried deploying it manually, and automatically. I have also ensured it is installed to ‘bin’ rather than the gac (although it does appear to automatically install to the gac when deploying it).

    I’m using WSS 3.0 (not MOSS or portal).

    If you have any suggestions for a fix for this problem, I’ll be happy to try them out. You can email me at hezser[at]buncle[.]co[.]uk

    Karl :)

  24. 24th September 2008 at 16:55

    I’m having the same problem as most that have commented above “Cannot import this webpart”. When I download the source code in the solution still the rh.update proyect and the reference to this is broken.

    Can you tell me where to find it?

    Thanks.

  25. 24th September 2008 at 20:21

    Hi,
    you are right. I forgot to include the download link in this post. I’ve updated it. See above.

    René

  26. 29th September 2008 at 14:31

    Hi René, I’m trying import the webpart, the code are perfect i was looking if the webpart class is inherited either from Microsoft.SharePoint.WebPartPages.WebPart or System.Web.UI.WebControls.WebParts.WebPart and it’s ok, the webpart class is public, I added the dll to the safecontrols in the web.config, and in the gac and in the web.config the dll had the same token and all (version etc), i changed the trust level in the config file to Full. Although I was with the same problem when i was importing appears this error: cannont add the selected web elements, cannot import this webpart.
    If you have any suggestions for a fix for this problem, I’ll be
    happy to try them out.

    Thank you anyway!!!

  27. 1st October 2008 at 23:01

    Hi,
    I really have no idea what the problem might be :-(
    I am uploading a new version with more try/catch. Please try it, and report back.

    thx
    René

  28. 1st October 2008 at 23:24

    All the guys who have import errors. Could you look at “Central Administration > Operations > Solution Management > Solution Properties” if the deployment failed?
    If so, remove the solution, download the latest version and reinstall/deploy it.
    You might need to force the deployment:
    stsadm -o deploysolution -name RH.MyAlerts.wsp -url http://yoururl -immediate -allowgacdeployment -force

    René

  29. 17th October 2008 at 21:00

    I’ve successfully deployed the Solution, but am unable to activate the feature on a site or Site Collection.

    Will this web part allow for alerts to be shown from both a my.domain.com and a portal.domain.com scenario?

  30. 19th October 2008 at 17:24

    Hi,
    why is it not possible to activate the feature?

    If you check the checkbox, it will show you ALL alerts.
    “Alerts from this site, the sites benath and all other alerts in sites of this SharePoint Farm are displayed. Do you want to see alerts from all sites?”

    René

  31. 20th October 2008 at 18:44

    I’m uncertain why it won’t activate. I get an access denied error when i try to.

    People have different definitions around “Sharepoint Farms” – do you intend this to mean all web applications under all SSPs?

    paul

  32. 24th October 2008 at 19:51

    Hi Rene, I’m the same person that I talked with you about the proyect update and then I asked you the last post of Cannot import this webpart, I’m Daniel Garcia from Spain. Well only comment that I download the lasted v that you upload when I asked you the problem with the cannot import this webpart, and this solution works fine!!, I can view my alerts… only the alert of my user…, Good Work! This is a great article.

    Only one comment if you want I will translate the web part to spanish the next week and I send you a resource with all translate to spanish.

    Do you like it?

    Thank’s a lot.

    Kind Regards,
    Daniel.

  33. 24th October 2008 at 20:27

    Alert ———————- Alerta
    Error_in —————— Existe un error en
    Frequency—————- Frecuencia
    Frequency_Daily——— Envía un informe diario
    Frequency_Inmediate— Envía e-mail inmediatamente
    Frequency_weekly——- Envía un informe semanal
    Menu_GoToList———– Ir a la lista ‘%LISTNAME%’
    Menu_GoToListItem——Ir al elemento
    Menu_GoToWebSite——Ir al sitio web ‘%WEBTITLE%’
    ToolPart_DisplayFields—Selecciona cual de los campos deberían ser mostrados:
    ToolPart_ShowAlertTypeColumn– Tipo
    ToolPart_ShowEventTypeColumn–Evento
    ToolPart_ShowFrequencyColumn–Frecuencia
    ToolPart_ShowFromAllSites———Las alertas de este sitio y otras alertas del sitio de esta granja estan siendo mostradas. ¿Deseas ver todas las alertas de todos los sitios?
    ToolPart_ShowListColumn———–Lista
    ToolPart_ShowWhichColumns——-¿Cuales de estas columnas deseas que sean mostradas?

    Regards,

    Daniel.

  34. 24th October 2008 at 20:39

    I didn’t know why? but I only press button kommentar senden one time and…, sorry again.

    Regards,

    Daniel.

  35. 26th October 2008 at 09:05

    Hi Daniel,
    glad to hear the Webpart works for you.
    I will implement the spanish translations you provided.

    René

  36. 29th October 2008 at 11:35

    Hi Rene, I detected one bug in the lasted code when you implement ES resource.

    When i added the webpart:

    The Constructor in the class MyAlerts fail.

    Error Message:

    Error in Constructor: System.Security.SecurityException.

    I was debugging the code and the problem is produced in the constructor because is called 21 times obviously when charge the variables, and this produced an error of System.Security.Permissions.SecurityPermissionSystem, if you change the constructor and clean the contructor put a contructor empty, change these lines and put these in the CreateChildControls method write new variables public for that with get and set for store the object this error disappear and work fine without errors.

    If you have other suggestions for a fix for this problem, I’ll be
    happy to try them out.

    Regards,

    Daniel.

  37. 6th November 2008 at 16:39

    Hello,

    i have the same Error in the last Version. Can anywhere help me?

    Regards,

    Chris

    Error in Constructor: System.Security.SecurityException: Fehler bei der Anforderung des Berechtigungstyps System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. bei RH.TraceProvider.NativeMethods.UnregisterTraceGuids(UInt64 regHandle) bei RH.TraceProvider.UnregisterTraceProvider() bei RH.Common.WriteULSError(String text) bei RH.Common.GetCultureInfo(SPWeb web) bei RH.MyAlerts..ctor() Die Aktion, bei der ein Fehler aufgetreten ist: Demand Der Typ der ersten Berechtigung, bei der ein Fehler aufgetreten ist: System.Security.Permissions.SecurityPermissionSystem.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. bei RH.MyAlerts.CreateGridColumns() Es ist ein Fehler aufgetreten CreateChildControls: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. bei RH.MyAlerts.CreateChildControls()

  38. 25th November 2008 at 22:06

    Can this be used or updated for administrators to view all user alerts that have been setup for a site in the MOSS 2007 env?

    Thanks,
    hkp

  39. 25th November 2008 at 23:04

    Hi,
    as admin, you can already see all alerts.
    http://yoururl/_layouts/sitesubs.aspx will show a page, where you can see all alerts for your users.

    René

  40. 17th February 2009 at 16:33

    Could be possible that you can deliver this file with extension *.wsp to ‘*.webpart or *.dwp’ because not everybody has Admin Collector Right?

    Regards,

    Cris

  41. 17th February 2009 at 19:59

    Hi Cris,
    unfortunately that is not possible.
    A wsp file is a solution, which is a cab file.
    A webpart or dwp file is just xml, which describes which webpart to add. It does not contain any logic.

    René

  42. 17th April 2009 at 17:01

    Hi,

    there is a little display problem.
    when having a site for example called “Test & Test” the alert webpart displays:

    site: Test & Test
    -> alerts

    in the alert menu Test & Test is right.

    how can i change the & in the grouping to &? do you have any idea?

    that would be great, thx!

    regards,
    stefanie

  43. 2nd July 2009 at 17:09

    Hi René!

    This is wonderful, and I hope that it is OK that I wrote about it on my blog? =)

    Regards
    Jenny

  44. 1st September 2009 at 05:51

    Hi René
    I’m really excited about your webpart – excellent work :)
    I do have one question though – is there a way to make it work on my extended web application?
    My default one is internal use only, and we have a secondary url that our users across other networks access. What I’m finding is that when I click on any of the links within the alert webpart, they’re directing me to the internal url for the collection, which won’t work for most of our users.
    Is there any way around this?

  45. 23rd September 2009 at 17:09

    Hi René,

    I’m trying to load the solution in VS2008 with the WSPBuilder Extension 1.06. but I receive the error “The application for the project is not installed.”. Am I missing some add-in in order to load the solution and project in Visual Studio?

    Thanks.

  46. 25th November 2009 at 09:13

    Hi René
    First of all… Thanks for the great effort, you are my hero. Keep up the good work.

    Some user get this error:
    Error: Access Denied.

    Can you please help ? Thank in advance

    Br
    Gert

  47. 11th March 2010 at 11:37

    Hi Rene,

    I am using your My Alerts web part, but I have a question about the, Do you want to see alerts from all sites? option. Is it possible to get another option that shows all alerts, but just for the user that is logged in. If I enable this option now, it takes a long time to load the page and I get a list from all alerts for all users.

    Thank you for great effort.

    Maikle

  48. 10th May 2010 at 14:37

    I think you’ve done a fantastic job, however, when I try to add the web part into one of my pages, I receive the following message and the web part is not dispalyed:

    Unable to add the selected web part(s).

    RH.MyAlerts.wsp: The file you imported is not valid. Verify that the file is a Web Part description file (*.webpart or *.dwp) and that it contains a well formed XML.

    Can you explain what I might be doing wrong. Thank you.

    Regards

    Chris

  49. 8th March 2011 at 00:00

    thank you very much. nice article.

    regards

  50. 9th March 2011 at 23:14

    thank u a lot for this article.

  51. 8th April 2011 at 12:40

    Thank you for very nice!

    It’s bad that this is not include in SharePoint out of box.

    Also, love the reflection and 3D on the image. :)))

  52. 22nd April 2013 at 18:51

    There is the solution for alerts customization in SharePoint: http://www.harepoint.com/Products/HarePointCustomAlerts/Default.aspx

Leave a Reply

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