<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Pete Sheill</title><link>http://blogs.msdn.com/psheill/default.aspx</link><description>Developer on the CLR team</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>How to get great search results and support healthy competition on the web</title><link>http://blogs.msdn.com/psheill/archive/2009/06/16/how-to-support-healthy-competition-and-get-great-search-results.aspx</link><pubDate>Tue, 16 Jun 2009 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9762369</guid><dc:creator>psheill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/psheill/comments/9762369.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=9762369</wfw:commentRss><description>&lt;P&gt;&lt;BR&gt;&amp;nbsp;How can you get the best search results, get cash back and promote a healthy marketplace in web search?&amp;nbsp; A few simple &lt;/P&gt;
&lt;P&gt;steps:&lt;/P&gt;
&lt;P&gt;1) &lt;A href="http://www.mozilla.com/en-US/products/download.html?product=firefox-3.0.11&amp;amp;os=win&amp;amp;lang=en-US" mce_href="http://www.mozilla.com/en-US/products/download.html?product=firefox-3.0.11&amp;amp;os=win&amp;amp;lang=en-US"&gt;Install Firefox&lt;/A&gt;&amp;nbsp;- we need an exclusive&amp;nbsp;feature from it.&lt;/P&gt;
&lt;P&gt;2) Learn about Firefox keywords from &lt;A href="http://support.mozilla.com/en-US/kb/Smart+keywords"&gt;http://support.mozilla.com/en-US/kb/Smart+keywords&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;3) Create a keyword that opens two tabs - one for Google and one for Bing.&lt;/P&gt;
&lt;P&gt;Start by going to &lt;A href="http://www.bing.com/"&gt;www.bing.com&lt;/A&gt;, right clicking in the search address, then selecting "add a keyword for this search".&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Give it a short name like 'm' for multisearch and save it.&amp;nbsp; Then go to the bookmark, right click on it and select &lt;/P&gt;
&lt;P&gt;"Properties".&amp;nbsp; Enter the following for the location:&lt;/P&gt;
&lt;P&gt;javascript:void(window.open('http://google.com/search?q=%s'));void(window.open("&lt;A href="http://www.bing.com/search?q=%"&gt;http://www.bing.com/search?q=%&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;s&amp;amp;form=QBLH"))&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;4) Now when you need to find something, open firefox and type "m &amp;lt;item&amp;gt;" in the address bar.&amp;nbsp; It will open a tab for &lt;/P&gt;
&lt;P&gt;each search provider.&amp;nbsp; Note: Firefox may prevent the tabs from opening the first time - if so, click on the "allow" &lt;/P&gt;
&lt;P&gt;button.&lt;/P&gt;
&lt;P&gt;5) (Advanced)&amp;nbsp; If desired, add other favorite search providers by repeating the ';void(window.open("&amp;lt;url&amp;gt;"))' part of &lt;/P&gt;
&lt;P&gt;the address above - you're in control. &lt;/P&gt;
&lt;P&gt;That works for me.&amp;nbsp; Do you have a better way?&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9762369" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/psheill/archive/tags/google/default.aspx">google</category><category domain="http://blogs.msdn.com/psheill/archive/tags/firefox/default.aspx">firefox</category><category domain="http://blogs.msdn.com/psheill/archive/tags/bing/default.aspx">bing</category></item><item><title>Fastest possible way to review your code changes</title><link>http://blogs.msdn.com/psheill/archive/2009/05/13/fastest-possible-way-to-review-your-code-changes.aspx</link><pubDate>Wed, 13 May 2009 21:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9610289</guid><dc:creator>psheill</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/psheill/comments/9610289.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=9610289</wfw:commentRss><description>&lt;P&gt;If you have some simple TFS changes&amp;nbsp;to sanity check, here's a quick way to review them:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tf diff /format:Unix | gvim -&lt;/P&gt;
&lt;P&gt;This will load up the diffs in VIM where you can review them without ever touching the mouse.&amp;nbsp; &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9610289" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/psheill/archive/tags/VIM/default.aspx">VIM</category><category domain="http://blogs.msdn.com/psheill/archive/tags/TFS/default.aspx">TFS</category></item><item><title>Customizing BgInfo to include the installed runtimes</title><link>http://blogs.msdn.com/psheill/archive/2009/04/01/Customizing-BgInfo-to-include-the-installed-runtimes.aspx</link><pubDate>Wed, 01 Apr 2009 20:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9527514</guid><dc:creator>psheill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/psheill/comments/9527514.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=9527514</wfw:commentRss><description>&lt;P&gt;Almost without exception, Windows developers use the tools from Sysinternals such as Process Explorer.&amp;nbsp; Another one that I've recent adopted is &lt;A class="" href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx" mce_href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx"&gt;BgInfo&lt;/A&gt;, which displays&amp;nbsp;useful system info on your desktop to save time and help distinguish multiple machines (Hyper-V users, you know what I mean).&amp;nbsp; I often find myself checking to see which .NET Runtimes are installed on a machine.&amp;nbsp; Standalone, BgInfo doesn't include any information about runtimes, but it does allow for customization, and that's what inspired this post.&amp;nbsp; I wrote a small script that will list the runtimes it finds installed on your system - when called by BgInfo, the runtime versions will be displayed on the desktop.&amp;nbsp; To use, just create a file called "runtimes.vbs" with the following contents.&amp;nbsp; Then run BgInfo, press the "Custom" button, "New", type ".NET Runtimes" for the Identifier, select "VB Script file" and enter the path of the runtimes.vbs file.&amp;nbsp; Running BgInfo from your startup folder keeps the information up-to-date.&lt;/P&gt;&lt;PRE&gt;'
'Script to print out the installed .NET runtimes in the system
'
set fso = CreateObject("Scripting.FileSystemObject")
set WSHShell = CreateObject("WScript.Shell")
windir = WSHShell.ExpandEnvironmentStrings("%windir%") 
frameworkDir = windir + "\\Microsoft.net\\framework"
if fso.FolderExists(frameworkDir) then
    set installRoot = fso.GetFolder(frameworkDir)
    set frameworkFolder = installRoot.SubFolders
    for each f1 in frameworkFolder
        ' Look for folders that have the .NET runtime binaries or compilers in them
        if fso.FileExists(f1 + "\\mscorwks.dll") or fso.FileExists(f1 + "\\clr.dll") or fso.FileExists(f1 + "\\csc.exe") then
        echo f1.name
      end if
    next
end if
set fso = nothing
set installRoot = nothing
set frameworkFolder = nothing
&lt;/PRE&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9527514" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/psheill/archive/tags/BgInfo/default.aspx">BgInfo</category><category domain="http://blogs.msdn.com/psheill/archive/tags/clr/default.aspx">clr</category></item><item><title>CodeDOM and Memory Usage</title><link>http://blogs.msdn.com/psheill/archive/2007/10/18/codedom-and-memory-usage.aspx</link><pubDate>Thu, 18 Oct 2007 20:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5511017</guid><dc:creator>psheill</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/psheill/comments/5511017.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=5511017</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/650ax5cx.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/650ax5cx.aspx"&gt;CodeDOM&lt;/A&gt; &lt;/FONT&gt;&lt;FONT face=Calibri size=3&gt;is used by several other library components including WinForms, ASP.NET, XSLT and Web Services.&amp;nbsp; It can be used to automatically generate code at design time, such as from a visual form, and it can be used to generate code at runtime, "on the fly", for performance.&amp;nbsp; It provides fast performance because the code is compiled into an assembly, loaded by the CLR and then JIT compiled into native code.&amp;nbsp; It's been used successfully in many contexts since it was first released in .NET 1.0.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;One aspect of this that may catch some customers offguard is that assemblies are never unloaded by the CLR, aside from entire AppDomain unloads.&amp;nbsp; Therefore each assembly created by CodeDOM will remain in the address space even if it is no longer used.&amp;nbsp; For most applications, this doesn't present a problem - there is a bound to the number of assemblies the applications loads, and when they are no longer needed, the pages can be swapped out to disk by the Windows Virtual Memory (VM) subsystem, so they don't affect the rest of the application.&amp;nbsp; We have seen a few cases where the application uses CodeDOM repeatedly without bound, however, leading to out-of-memory and related exceptions.&amp;nbsp; When we examined these situations, we noticed that there was actually lots of free memory, but it was so fragmented that it couldn't be used.&amp;nbsp; We were puzzled until we examined how many assemblies were loaded into the process.&amp;nbsp; We found nearly 40000!&amp;nbsp; The fragmentation arose because each assembly under 64 KB in size is loaded into a segment of 64 KB.&amp;nbsp; So a 16 KB assembly would cause 48 KB of address space to be wasted.&amp;nbsp; Repeat thousands of time and it's not hard to exhaust the available address space of a 32-bit CPU.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;The best way to avoid this situation is to limit the number of times your application generates and loads a new assembly.&amp;nbsp; Cache the assembly in memory rather than regenerating it.&amp;nbsp; For example, if you use the XSLTransform type, cache the result of the Load method rather than calling it repeatedly for the same XSL document.&amp;nbsp; Assuming you have less than 40000 XSL documents in use, that will completely solve your problem, and reduce the number of costly compilations to boot.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Here are&amp;nbsp;some details of our investigation.&amp;nbsp; &lt;/FONT&gt;&lt;FONT face=Calibri size=3&gt;The exception we were seeing actually happened when we didn't have enough contiguous memory to start up an external process.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Exception type: System.Runtime.InteropServices.ExternalException&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Message: Cannot execute a program. The command being executed was "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /noconfig /fullpaths @"C:\WINDOWS\TEMP\rvnypb_j.cmdline".&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;InnerException: &amp;lt;none&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;StackTrace (generated):&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&amp;lt;none&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;StackTraceString: &amp;lt;none&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'"&gt;HResult: 8&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Here's some memory information from Windbg.&amp;nbsp; The last line indicates large amounts of fragmentation, leaving only individual 64KB segments available.&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;-------------------- State SUMMARY --------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;TotSize (&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;KB)&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Pct(Tots)&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Usage&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;31b0d000 (&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;814132) : 25.88%&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;: MEM_COMMIT&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;7c5b9000 ( 2037476) : 64.77%&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;: MEM_FREE&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;11f2a000 (&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;294056) : 09.35%&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;: MEM_RESERVE&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Courier New'"&gt;&lt;STRONG&gt;Largest free region: Base 00000000 - Size 00010000 (64 KB)&lt;o:p&gt;&lt;/o:p&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5511017" width="1" height="1"&gt;</description></item><item><title>Team Foundation Server Event notifications</title><link>http://blogs.msdn.com/psheill/archive/2006/05/09/593946.aspx</link><pubDate>Tue, 09 May 2006 23:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:593946</guid><dc:creator>psheill</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/psheill/comments/593946.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=593946</wfw:commentRss><description>&lt;P&gt;Howard van Rooijen is doing &lt;A href="http://blogs.conchango.com/howardvanrooijen/archive/2006/04/29/3894.aspx"&gt;interesting things with Team Foundation Server events&lt;/A&gt;, and sharing his work.&amp;nbsp; That's great to see.&amp;nbsp;&amp;nbsp;There are&amp;nbsp;a few things I'd like to add to his post.&amp;nbsp; There are some important events not listed on his page.&amp;nbsp; One is the CheckinEvent.&amp;nbsp; It is raised with each version control checkin.&amp;nbsp; Another is the ProjectCreatedEvent.&amp;nbsp; It is fired at the very end of new project creation.&amp;nbsp; The CheckinEvent type can be found in the Microsoft.TeamFoundation.VersionControl.Common.Integration.dll assembly, while the ProjectCreatedEvent (and ProjectDeletedEvent too) may be found in the Microsoft.TeamFoundation.dll assembly.&amp;nbsp; Other events in that assembly are: NodeCreatedEvent, NodeRenamedEvent and NodesDeletedEvent&lt;/P&gt;
&lt;P&gt;Also, a few of the events are listed in his post but are no longer raised, or raised inconsistently.&amp;nbsp; They are the IdentityCreatedEvent, the IdentityDeletedEvent, the MembershipChangedEvent and the AclChangedEvent.&amp;nbsp; It's best not to use these events.&lt;/P&gt;
&lt;P&gt;Thanks Howard.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=593946" width="1" height="1"&gt;</description></item><item><title>Be careful creating custom subscriptions with BisSubscribe - event type names are case sensitive</title><link>http://blogs.msdn.com/psheill/archive/2006/03/16/552941.aspx</link><pubDate>Thu, 16 Mar 2006 19:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:552941</guid><dc:creator>psheill</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/psheill/comments/552941.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=552941</wfw:commentRss><description>&lt;P&gt;We tried to be generally case insensitive in Tfs, in alignment with the default settings in Sql Server and Windows.&amp;nbsp; There's one place where we messed up though.&amp;nbsp; If you create a subscription to a "CheckInEvent" through the command-line tool, you won't get any alerts.&amp;nbsp; That's because the event type is really "CheckinEvent" -- small 'i'.&amp;nbsp; We do the type matching based on a hashtable lookup, and the hashcode for "CheckinEvent" is different from the hashcode for "CheckInEvent".&amp;nbsp; The unfortunate result is that you won't receive any notifications.&amp;nbsp; We will certainly fix it in the next version.&amp;nbsp; Until then, be careful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=552941" width="1" height="1"&gt;</description></item><item><title>Configuring WorkItemTracking Object Model for use by a Web Service or Web Application</title><link>http://blogs.msdn.com/psheill/archive/2006/03/03/543120.aspx</link><pubDate>Fri, 03 Mar 2006 22:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:543120</guid><dc:creator>psheill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/psheill/comments/543120.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=543120</wfw:commentRss><description>&lt;P&gt;I'm posting this for a colleague - Naren Datha.&amp;nbsp; It's a document he wrote for developers writing web service/application Team System add-ons that rely on the Work Item Tracking object model.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=543120" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/psheill/attachment/543120.ashx" length="150528" type="application/msword" /></item><item><title>Receiving Team Foundation events - one more correction</title><link>http://blogs.msdn.com/psheill/archive/2006/02/28/540945.aspx</link><pubDate>Wed, 01 Mar 2006 03:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:540945</guid><dc:creator>psheill</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/psheill/comments/540945.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=540945</wfw:commentRss><description>&lt;P&gt;If you've written any web services that listen for Team Foundation events for any previous beta releases, you'll want to update your web method for RC.&amp;nbsp; We made one (hopefully last) change to the Action and RequestNamespace.&amp;nbsp; The "02" became an "03".&amp;nbsp; If you don't change this, you will not get notified and you will see an error about an "unrecognized Soap Action".&amp;nbsp; Here is one valid way to write the webmethod:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;[SoapDocumentMethod(Action = &lt;A href="http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/03/Notify"&gt;"http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/03/Notify&lt;/A&gt;",&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;RequestNamespace="&lt;A href="http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/03"&gt;http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/03&lt;/A&gt;"&lt;BR&gt;)]&lt;BR&gt;[WebMethod]&lt;BR&gt;public void Notify(string eventXml) &lt;BR&gt;{&lt;BR&gt;&amp;nbsp; ...&lt;BR&gt;}&lt;/FONT&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=540945" width="1" height="1"&gt;</description></item><item><title>Sql Server 2005 blocking quiz</title><link>http://blogs.msdn.com/psheill/archive/2006/02/20/535614.aspx</link><pubDate>Mon, 20 Feb 2006 22:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:535614</guid><dc:creator>psheill</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/psheill/comments/535614.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=535614</wfw:commentRss><description>&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;You’ve read &lt;I style="mso-bidi-font-style: normal"&gt;Inside Sql Server 2000&lt;/I&gt; cover to cover, but how well do you really know the database locking behavior?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; Here's a 10 question quiz (attached) to find out.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=535614" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/psheill/attachment/535614.ashx" length="101376" type="application/msword" /></item><item><title>How to subscribe to Tfs alerts for new workitems only</title><link>http://blogs.msdn.com/psheill/archive/2006/02/01/522386.aspx</link><pubDate>Wed, 01 Feb 2006 22:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:522386</guid><dc:creator>psheill</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/psheill/comments/522386.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=522386</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to get notified for all new workitems, regardless of who they get assigned to, you will want a custom subscription.&amp;nbsp; Here is an example of how to create one with the BisSubscribe tool that is on the server.&amp;nbsp; There is a ChangeType with each WorkItemChangedEvent, set to either "Change" or "New".&amp;nbsp; In the filter expression below, only new changes will generate emails.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BisSubscribe.exe /userId &amp;lt;domain\username&amp;gt; /eventType WorkItemChangedEvent /deliveryType EmailHtml /domain &amp;lt;server name&amp;gt; /address &amp;lt;email address&amp;gt; /filter "PortfolioProject = '&amp;lt;project&amp;gt;' AND ChangeType = 'New' "&lt;/p&gt;
&lt;p&gt;&amp;lt;domain\username&amp;gt; - user getting the notification&lt;br/&gt;&amp;lt;server name&amp;gt; - your server&lt;br/&gt;&amp;lt;email address&amp;gt; - full email address to receive the notification&lt;br/&gt;&amp;lt;project&amp;gt; - project title of interest&lt;/p&gt;
&lt;p&gt;Note, if you are using a build later that Beta3, the syntax should be modified slightly to the following:&lt;/p&gt;
&lt;p&gt;BisSubscribe.exe /eventType WorkItemChangedEvent /deliveryType EmailHtml /server &amp;lt;server name&amp;gt; /address &amp;lt;email address&amp;gt; /filter "PortfolioProject = '&amp;lt;project&amp;gt;' AND ChangeType = 'New' "&lt;/p&gt;
&lt;p&gt;Where there is no "/userId" and "/server" replaces "/domain"&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=522386" width="1" height="1"&gt;</description></item><item><title>Tfs via Python</title><link>http://blogs.msdn.com/psheill/archive/2006/01/30/519824.aspx</link><pubDate>Tue, 31 Jan 2006 02:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:519824</guid><dc:creator>psheill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/psheill/comments/519824.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=519824</wfw:commentRss><description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;I did some experiments interacting with Tfs through &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=910F423F-BBD2-4E52-BAB6-AA21592EDC3B&amp;amp;displaylang=en"&gt;IronPython&lt;/a&gt;, and it's been enjoyable.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;They've done a great job making .NET available in a dynamic way through the Python language.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;IronPython can run as an interactive toplevel, where it responds to your commands as you give them.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;That's good because you get immediate feedback.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Instead of a lengthy cycle of &lt;i style="mso-bidi-font-style: normal"&gt;code - compile - launch - navigate to the location of the change - see result&lt;/i&gt; cycle, it's a quick &lt;em&gt;try method - see result&lt;/em&gt; cycle.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;You can also quickly ask the system for a list of available methods of an object.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I was able to test a few WorkItem queries directly to the API.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;See the result below.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;I installed IronPython on my client machine and&amp;nbsp;entered the following at the IronPythonConsole.exe prompt (”&amp;gt;&amp;gt;&amp;gt;”):&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;servername = "myServerName" &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;privateAssembliesPath = "c:\\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies" &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;import clr&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;clr.AddReferenceByPartialName("Microsoft.TeamFoundation")&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;clr.AddReferenceByPartialName("Microsoft.TeamFoundation.Common")&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;clr.AddReferenceByPartialName("Microsoft.TeamFoundation.Client")&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;clr.AddReferenceToFile(privateAssembliesPath + "\\Microsoft.TeamFoundation.WorkItemTracking.Client.dll")&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;from Microsoft.TeamFoundation.Server import *&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;from Microsoft.TeamFoundation.Proxy import *&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;from Microsoft.TeamFoundation.Client import *&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;from Microsoft.TeamFoundation.WorkItemTracking.Client import *&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;tfs = TeamFoundationServerFactory.GetServer(servername)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:state w:st="on"&gt;&lt;st1:place w:st="on"&gt;wis&lt;/st1:place&gt;&lt;/st1:state&gt; = tfs.GetService(WorkItemStore)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;for p in wis.Projects: &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;print p.Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;query = "SELECT [System.Id],[System.State], [System.Title] FROM WorkItems \&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;WHERE [System.State] &amp;lt;&amp;gt; 'Closed' ORDER BY \&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;[System.WorkItemType], [System.Id]"&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;workitems = wis.Query(query)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;for wi in workitems:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;print wi.Title&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=519824" width="1" height="1"&gt;</description></item><item><title>How to verify Tfs is sending emails</title><link>http://blogs.msdn.com/psheill/archive/2005/11/28/497662.aspx</link><pubDate>Tue, 29 Nov 2005 02:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:497662</guid><dc:creator>psheill</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/psheill/comments/497662.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=497662</wfw:commentRss><description>In some cases, it's necessary to verify that Tfs is attempting to send emails. In the release version, we've made sure that errors connecting to the mail server are logged in the Application event log on the TF Server. Until release, or if you would like more details, you can turn on tracing. To do so, open \Program Files\Microsoft Team Foundation 2005\Web Services\web.config and look for this section: &lt;BR&gt;&lt;PRE&gt;    &amp;lt;system.diagnostics&amp;gt;
        &amp;lt;assert assertuienabled="false" /&amp;gt;
        &amp;lt;trace autoflush="false" indentsize="4" /&amp;gt;
        &amp;lt;!--  Trace Switches
            Each of the trace switches should be set to a value between 0 and 4, inclusive.
              0: No trace output
              1-4: Increasing levels of trace output; see Systems.Diagnostics.TraceLevel
        --&amp;gt;
        &amp;lt;switches&amp;gt;
            &amp;lt;add name="API" value="0" /&amp;gt;
            &amp;lt;add name="Authentication" value="0" /&amp;gt;
            &amp;lt;add name="Authorization" value="0" /&amp;gt;
            &amp;lt;add name="Database" value="0" /&amp;gt;
            &amp;lt;add name="General" value="3" /&amp;gt;
            &amp;lt;!-- WorkItem trace switches --&amp;gt;
            &amp;lt;add name="traceLevel" value="1" /&amp;gt;
        &amp;lt;/switches&amp;gt;        
    &amp;lt;/system.diagnostics&amp;gt;
&lt;/PRE&gt;Set the General value to "3". Then details about the events and notifications will be logged. You can view it with either dbgview (http://www.sysinternals.com/Utilities/DebugView.html) or by adding the following section between &amp;lt;trace&amp;gt; and &amp;lt;/trace&amp;gt; to create a log file. Note that the service account will need permission to write to that location on disk - c:\windows\temp in the example below. &lt;BR&gt;&lt;PRE&gt;        &amp;lt;listeners&amp;gt;
           &amp;lt;add name="myListener" type="System.Diagnostics.TextWriterTraceListener"
               initializeData="c:\windows\temp\myListener.log" /&amp;gt;
        &amp;lt;/listeners&amp;gt;
&lt;/PRE&gt;After making those changes, assuming you have created a matching subscription, you should see entries like the following for each event. In this example, I have subscribed to Checkin events. If there are problems sending emails, you will see a set of entries like the second set. &lt;BR&gt;&lt;BR&gt;// Successful email send &lt;PRE&gt;[Info, PID 3456, TID 3040, 22:59:25.296] Calling notification filter: Microsoft.TeamFoundation.VersionControl.Server.CheckinEventFilter 
[Info, PID 3456, TID 3040, 22:59:27.374] Found restrictions: Microsoft.TeamFoundation.VersionControl.Server.CheckinEventFilter 
[Info, PID 3456, TID 3040, 22:59:27.390] Activating a new thread to send events. 
[Info, PID 3456, TID 3060, 22:59:27.390] Entering Send loop 
[Info, PID 3456, TID 3060, 22:59:27.640] Done with notification. 
[Info, PID 3456, TID 3060, 22:59:27.656] Exiting Send loop
&lt;/PRE&gt;&lt;BR&gt;// Unsuccessful email send &lt;PRE&gt;[Info, PID 3456, TID 3040, 22:55:39.870] Calling notification filter: Microsoft.TeamFoundation.VersionControl.Server.CheckinEventFilter 
[Info, PID 3456, TID 3040, 22:55:41.995] Found restrictions: Microsoft.TeamFoundation.VersionControl.Server.CheckinEventFilter 
[Info, PID 3456, TID 3040, 22:55:42.026] Activating a new thread to send events. 
[Info, PID 3456, TID 304, 22:55:42.026] Entering Send loop 
[Info, PID 3456, TID 304, 22:55:42.636] Exiting Send loop
&lt;/PRE&gt;&lt;BR&gt;Error details appear in Event Log (RTM only, not Beta 3): &lt;PRE&gt;    TF50282: Could not connect to the following e-mail server: smtpHost 
    Error message: System.Net.Mail.SmtpException: Client does not have permission to submit mail to this server. The server response was: 5.7.3 Client does not have permission to Send As this sender.
&lt;/PRE&gt;&lt;BR&gt;Note that there is no "Done with notification" in the second set of entries. &lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=497662" width="1" height="1"&gt;</description></item><item><title>How Tfs sends emails - testing the smtp pipes</title><link>http://blogs.msdn.com/psheill/archive/2005/11/22/495863.aspx</link><pubDate>Tue, 22 Nov 2005 21:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:495863</guid><dc:creator>psheill</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/psheill/comments/495863.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=495863</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;If you are having trouble getting Tfs to send emails, one thing to test is connectivity and permission to send.&amp;nbsp; Sometimes the mail server will refuse to accept email if the sending account doesn't itself have a mailbox, or if the "from" address doesn't match the account that is connecting to the server. Log in as the service account, create a console application, copy and paste the following code, replace the first three strings with the appropriate values, compile and run it.&amp;nbsp; If it is a problem connecting to the mail server, you should get a good&amp;nbsp;error message printed out.&amp;nbsp; Otherwise you should see the email appear in your inbox.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;using System;&lt;BR&gt;using System.Net;&lt;BR&gt;using System.Net.Mail;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;namespace MailSender&lt;BR&gt;{&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;class Sender&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void Main(string[] args)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string Host = "myEmailServer";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string FromAddress = "&lt;A title=mailto:serviceAccount@somewhere.com href="mailto:serviceAccount@somewhere.com" target=_blank&gt;serviceAccount@somewhere.com&lt;/A&gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string ToAddress = "&lt;A title=mailto:me@somewhere.com href="mailto:me@somewhere.com" target=_blank&gt;me@somewhere.com&lt;/A&gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SmtpClient client = new SmtpClient(Host);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MailMessage mm = new MailMessage(FromAddress, ToAddress);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mm.Body="TestBody";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mm.Subject="TestSubject";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.UseDefaultCredentials = true;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mm.BodyEncoding = System.Text.Encoding.UTF8;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.Send(mm);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(e.ToString());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadLine();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;}&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;}&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=495863" width="1" height="1"&gt;</description></item><item><title>Team Foundation Server (Tfs) Events </title><link>http://blogs.msdn.com/psheill/archive/2005/11/21/495366.aspx</link><pubDate>Mon, 21 Nov 2005 22:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:495366</guid><dc:creator>psheill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/psheill/comments/495366.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=495366</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;I’ve been meaning to write more about Team Foundation Server (TFS) events and notifications for some time now.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;These are the hooks for being notified of, for example, checkins or workitem (bug) changes. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Now that our beta3 is out, a lot more people are testing the features.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Many customers want to enable email notification.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Some partners are looking at using them to integrate other tools.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;So I’d like to write more about them in some upcoming posts. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;First I’ll focus on email notifications, since that’s a mainstream feature.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Later I’ll write more on using events to integrate with other software, an advanced topic that will be of interest to a more limited audience.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Underlying both is the same event processing engine, so naturally there is considerable overlap.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Comments and questions are welcome.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=495366" width="1" height="1"&gt;</description></item><item><title>Receiving Team Foundation Events - Correction</title><link>http://blogs.msdn.com/psheill/archive/2005/07/15/439321.aspx</link><pubDate>Fri, 15 Jul 2005 19:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:439321</guid><dc:creator>psheill</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/psheill/comments/439321.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=439321</wfw:commentRss><description>&lt;P&gt;The documentation for Visual Studio &lt;STRONG&gt;beta 2 &lt;/STRONG&gt;gives the following example for receiving TFS events (work item change, checkin, build completed, etc.).&lt;/P&gt;&lt;PRE&gt;[SoapDocumentMethod(Action = "http://Microsoft.VisualStudio.Bis/Notify")]
[WebMethod]
public void Notify(string bisEvent)
{
  ...
}
&lt;/PRE&gt;In fact it should be: 
&lt;P&gt;&lt;PRE&gt;[SoapDocumentMethod(Action = "http://Microsoft.VisualStudio.Bis/Notify", 
RequestNamespace = "http://Microsoft.VisualStudio.Bis")]
[WebMethod]
public void Notify(string eventXml)
{ 
  ...
} 
&lt;/PRE&gt;
&lt;P&gt;Note that the parameter name must be "eventXml" exactly, since webmethods depend on reflection to match SOAP arguments with methods. Post beta 2, it will be slightly different still: &lt;PRE&gt;[SoapDocumentMethod(Action = "http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/02/Notify" , 
   RequestNamespace="http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/02"
)]
[WebMethod]
public void Notify(string eventXml) 
{
  ...
}
&lt;/PRE&gt;
&lt;P&gt;If you don't have the attributes or the parameter name correct, you are likely to see the strange behavior of the method being called, but the parameter being null. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=439321" width="1" height="1"&gt;</description></item></channel></rss>