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:
- stsadm -o addsolution -filename RH.MyAlerts.wsp
- 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
Thanks
great solution!
Fehler :(
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!
Cannot import this webpart
I have the same problem as a.rode
Steven
Re: Cannot import this webpart
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é
Cannot import this webpart
Dear René,
I Also tried to use your webpart but also couldn’t import it !!, the following is the .webpart xml file :
–
–
–
Cannot import this Web Part.
–
–
MyAlerts
I have a problem
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
Cannot import this webpart
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 🙂
RE: Cannot import this webpart
I have the same problem like a.rode.
Is there any information about deploying it?
Problem with the wsp file
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?
Cannot import this webpart
I have the same problem as a.rode and Steven.
Did somebody ever found a solution for this?
AW: Display all my alerts
Quote:
Dear René,
I Also tried to use your webpart but also couldn’t import it !!, the following is the .webpart xml file :
–
–
–
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é
AW: Display all my alerts
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é
re: Problem with the wsp file
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é
Problem mit Webpart
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ß
AW: Display all my alerts
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
Funktioniert
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
re: Funktioniert
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é
Cannot import this webpart
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!!!
AW: Display all my alerts
Would you please stop posting the same comment over and over again!
Hello, nice site look this: End ^) See you Nice site! Good. Cool.
Hello, nice site look this:
End ^) See you
Nice site!
Good.
Cool.
I have the same problem importing the webpart as Steven and a.rode.
I have the same problem importing the webpart as Steven and a.rode.
AW: Display all my alerts
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?
Looks great! I can’t wait to see it working
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 🙂
Cool but..
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.
re: Cool but..
Hi,
you are right. I forgot to include the download link in this post. I’ve updated it. See above.
René
Cannot import this webpart
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!!!
re: Cannot import this webpart
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é
re: Import Error
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é
Unable to Activate the Feature
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?
re: Unable to Activate the Feature
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é
Activation issue
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
AddSolution & Deploy solution ok!!! All Works Fine
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.
Resource for Spanish (es)
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.
Sorry
I didn’t know why? but I only press button kommentar senden one time and…, sorry again.
Regards,
Daniel.
re: AddSolution & Deploy solution ok!!! All Works Fine
Hi Daniel,
glad to hear the Webpart works for you.
I will implement the spanish translations you provided.
René
Bug detected and Fixed
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.
Error
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()
administrators to view all user alerts in MOSS 2007 env
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
re: administrators to view all user alerts in MOSS 2007 env
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é
cris
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
René Hézser
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é
Stefanie
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
Jenny
Hi René!
This is wonderful, and I hope that it is OK that I wrote about it on my blog? =)
Regards
Jenny
Gretchen
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?
tomek
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.
Gert Petersen
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
Maikel
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
Chris
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
kfzversicherungsvergleich
thank you very much. nice article.
regards
krankenversicherungsvergleich-2
thank u a lot for this article.
ScarePoint
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. :)))
Mike
There is the solution for alerts customization in SharePoint: http://www.harepoint.com/Products/HarePointCustomAlerts/Default.aspx