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 thoughts on “Display all my alerts

  1. says

    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!

  2. 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


  3. 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

  4. 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é

  5. 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é

  6. 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é

  7. 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

  8. 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é

  9. 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!!!

  10. 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 :)

  11. says

    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.

  12. 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!!!

  13. 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é

  14. 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é

  15. 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

  16. 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.

  17. 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.

  18. 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.

  19. says

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

  20. says

    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

  21. 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é

  22. says

    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

  23. says

    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?

  24. says

    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.

  25. 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

  26. says

    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

  27. says

    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

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">