TF271001: An error occurred while attempting to send an e-mail notification

by sunil ravulapalli /2. March 2013 00:44 /tfs /Comments (0)

After setting up the Email settings in the "Team Foundation Administration Console", I still did not get any emails. Upon looking into the event logs I found:

TF53010: The following error has occurred in a Team Foundation component or extension:

Date (UTC): 3/1/2013 8:37:30 PM

Machine: TFSMACHINE

Application Domain: TfsJobAgent.exe

Assembly: Microsoft.TeamFoundation.Framework.Server, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727

Service Host: 

Process Details:

  Process Name: TFSJobAgent

  Process Id: 1468

  Thread Id: 2440

  Account name: COMPANY\TFS

Detailed Message: TF271001: An error occurred while attempting to send an e-mail notification to the following address: myself@company.com. Further e-mail notification errors that occur within the next five minutes might not be logged. Verify that the e-mail notification settings are correct in the Team Foundation Administration Console.

Exception Message: Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender (type SmtpException)

Exception Stack Trace:    at System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)

   at System.Net.Mail.DataStopCommand.Send(SmtpConnection conn)

   at System.Net.Mail.SmtpClient.Send(MailMessage message)

   at Microsoft.TeamFoundation.JobService.Extensions.Core.NotificationJobExtension.SendEmail(TeamFoundationRequestContext requestContext, TeamFoundationNotification notification)

OTHER FACTS:

1. TFS was a valid active directory user

2. "From address" was tfs@company.com

3. Anonymous sender was enabled in Exchange

Upon requesting the exchange team, they found this entry in their event log:

Log Name:      Application

Source:        MSExchangeTransport

Date:          2/26/2013 4:37:31 PM

Event ID:      1025

Task Category: SmtpReceive

Level:         Error

Keywords:      Classic

User:          N/A

Computer:      atlas.gopfs.com

Description:

SMTP rejected a (P1) mail from 'tfs@gopfs.com' with 'Spam Filter' connector and the user authenticated as 'GOPFS\TFS'. The Active Directory lookup for the sender address returned validation errors. Microsoft.Exchange.Data.ProviderError

Event Xml:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">

  <System>

    <Provider Name="MSExchangeTransport" />

    <EventID Qualifiers="49156">1025</EventID>

    <Level>2</Level>

    <Task>1</Task>

    <Keywords>0x80000000000000</Keywords>

    <TimeCreated SystemTime="2013-02-26T23:37:31.000000000Z" />

    <EventRecordID>8783951</EventRecordID>

    <Channel>Application</Channel>

    <Computer>atlas.gopfs.com</Computer>

    <Security />

  </System>

  <EventData>

    <Data>tfs@gopfs.com</Data>

    <Data>Spam Filter</Data>

    <Data>GOPFS\TFS</Data>

    <Data>P1</Data>

    <Data>Microsoft.Exchange.Data.ProviderError</Data>

  </EventData>

</EventD>

 

The last thing we tried was to enable a mail box to the "TFS" user in exchange and the emails started flowing!

TFS build not picking up correct configurations

by sunil ravulapalli /20. February 2013 23:34 /tfs /Comments (0)

I encountered a bizarre problem where TFS was picking up the wrong configuration settings. For example, if I wanted to do a production build using web.prod.config, it was picking up settings from web.qa.config.

After a lot of investigation, I found the answer in the Solution(.sln file). Essentially I think the solution was telling TFS to pick Qa settings when TFS asks for Prod. 

{AB15DD03-6329-4468-96F9-DE694B31617C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Debug|Any CPU.Build.0 = Debug|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Prod|Any CPU.ActiveCfg = Qa|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Prod|Any CPU.Build.0 = Qa|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Qa|Any CPU.ActiveCfg = Qa|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Qa|Any CPU.Build.0 = Qa|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Release|Any CPU.ActiveCfg = Release|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Release|Any CPU.Build.0 = Release|Any CPU

 

I still don't know what I keep doing for this to happen. But it happens multiple times for different projects and each time I have to go and fix this by manually going and editing it like below. 

 

 

{AB15DD03-6329-4468-96F9-DE694B31617C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Debug|Any CPU.Build.0 = Debug|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Prod|Any CPU.ActiveCfg = Prod|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Prod|Any CPU.Build.0 = Prod|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Qa|Any CPU.ActiveCfg = Qa|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Qa|Any CPU.Build.0 = Qa|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Release|Any CPU.ActiveCfg = Release|Any CPU

{AB15DD03-6329-4468-96F9-DE694B31617C}.Release|Any CPU.Build.0 = Release|Any CPU

 

How do I even google this? :)

Web.config not Transforming after TFS build

by sunil ravulapalli /8. January 2013 22:20 /tfs /Comments (0)

Web.config will not transform by the basic TFS build.
You need do a Deploy the application before the transform kicks in.

In your TFS build definition go to the process tab and in the MSBuild arguments put this:
/p:DeployOnBuild=true;DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder;
_PackageTempDir="\\DRIVE\Builds\Appname";AutoParameterizationWebConfigConnectionStrings=false

Deploy a Web Application after TFS Build

by sunil ravulapalli /8. January 2013 22:01 /tfs /Comments (0)

In your TFS build definition go to the process tab and in the MSBuild arguments put this:
/p:DeployOnBuild=true;DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder;
_PackageTempDir="\\DRIVE\Builds\Appname";AutoParameterizationWebConfigConnectionStrings=false

How to delete a TFS Project

by sunil ravulapalli /2. January 2013 23:43 /tfs /Comments (0)

1. Open visual studio Command Prompt
2. Run this Command:
C:\Program Files (x86)\Microsoft Visual Studio 11.0>
TFSDeleteProject /force /collection:http://servername:8080/tfs/collectioname projectname