1
votes

We have a TFS 2012 server and have tried to enable email alerts. However, we never receive them.

I have set up both team alerts and alerts specific to my account. When configuring the SMTP settings in the TFS Admin Console, I have tried leaving the credentials blank, and also using my own credentials. Neither works.

I have also created a simple console app in C# using the System.Net.Mail.SmtpClient class to test emails, both with and without my credentials, from the TFS server and it works.

The Event Logs don't show any relevant error messages.

How can I troubleshoot and fix this issue?

Update

Using the information in this article, I was able to extract the following error message from the database job history table.

elapsed time: 00:00:00.5255295, sql calls: 35, sql connect time: 00:00:00, sql execute time: 00:00:00.0311960, non-sql time: 00:00:00.4943335 (94%), cpu time: 00:00:00.0312002 ( 5.9%), avg connect time: 0.00 ms, avg execute time:  0.9 ms. All methods quick. All sql calls quick. CollectionError: CreateEvent != TransformEvents. CollectionError: AfterReadSubscription != ExpandEvents. CollectionError: RemoveRestrictedContent != FilterNotification. CollectionError: RemoveRestrictedContent != SendNotifications.
There were errors or warnings during notification delivery.

0/0 emails delivered.
0/0 soap notifications delivered. 
1 errors.
0 warnings.

-------------------------------
Notification not delivered due to error during filtering of restricted content.

Notification: WorkItemChangedEvent (DeliveryType: EmailHtml; Address: )

Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
   at System.Security.Cryptography.MD5CryptoServiceProvider..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Security.Cryptography.CryptoConfig.CreateFromName(String name, Object[] args)
   at System.Security.Cryptography.MD5.Create(String algName)
   at Microsoft.TeamFoundation.Framework.Server.Alm.ConversationThread.Create(TeamFoundationRequestContext requestContext, ToolType toolType, Byte artifactType, Int32 artifactId, String topic, DateTime creationDate)
   at Microsoft.TeamFoundation.WorkItemTracking.Server.NotificationFilter.RemoveRestrictedContent(TeamFoundationRequestContext requestContext, String server, TeamFoundationIdentity[] userIdentities, XmlDocument eventCopy, Restriction[]& restrictions)
   at Microsoft.TeamFoundation.JobService.Extensions.Core.NotificationJobExtension.FilterNotification(TeamFoundationRequestContext requestContext, TeamFoundationIdentity subscriber, IEnumerable`1 filters, TeamFoundationNotification notification)

As described here, I have checked Local Security Policy for the Security Settings->Local Policies->Security Options->"System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing" value and it was already set to disabled.

1

1 Answers

0
votes

Restarting the Visual Studio Team Foundation Background Job Agent service fixed this particular error for me.