Archive for August, 2009

16 Aug 2009

TF53002, TF30040, TF30059, TF30063 Team Foundation Server Errors

3 Comments Uncategorized

Today I received the following error while getting ready to do some new development for my URL Rewriter.

TF53002: Unable to obtain registration data for application VersionControl.
TF30040: The database is not correctly configured. Contact your Team Foundation Server administrator.
TF30059: Fatal error while initializing web service
TF30063: You are not authorized to access myserver.443. (type TeamFoundationServerUnauthorizedException)

This is very weird because I was just working on it earlier this week, without any issues.  So I go in to check the recent update history of Windows Update and to my surprise I see 13 new updates, mostly security related.  And since TF30063 is a security related exception, I think I found the culprit.  Here are the KB articles of the updates that were done for reference:

  1. KB956744
  2. KB973540
  3. KB947319
  4. KB971032
  5. KB960859
  6. KB971557
  7. KB973869
  8. KB973507
  9. KB973354
  10. KB961371
  11. KB971657
  12. KB890830
  13. KB973815

So I started searching the web for each of those error messages, and I found a ton of old articles related to the SP1 release of Team Foundation Server.  However I upgraded about a year ago to SP1 so I doubt that is the issue.  But during my searching I found an obscure article referencing KB926642, which on first pass I just brushed off as not being the issue.  But as I started reading it I remembered that I do access my server through a CNAME address, and one of these security updates might have disabled Windows Authentication through CNAME’s.  So I tried as the article suggested.

\\myserver\c$ — works
\\myserver-cname\c$ — tells me I am not authorized

So I followed Method 1 in KB926642:

Method 1 (recommended): Create the Local Security Authority host names that can be referenced in an NTLM authentication request

To do this, follow these steps for all the nodes on the client computer:

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
  3. Right-click MSV1_0, point to New, and then click Multi-String Value.
  4. In the Name column, type BackConnectionHostNames, and then press ENTER.
  5. Right-click BackConnectionHostNames, and then click Modify.
  6. In the Value data box, type the CNAME or the DNS alias, that is used for the local shares on the computer, and then click OK.Note Type each host name on a separate line.

    Note If the BackConnectionHostNames registry entry exists as a REG_DWORD type, you have to delete the BackConnectionHostNames registry entry.

  7. Exit Registry Editor, and then restart the computer.

And everything is working great now.  So if you are using a CNAME with your TF server, you may want to consider adding the CNAME in to the BackConnectionHostNames.  It will not only help your TF server, but all your other connections to this server that use Windows Authentication and the CNAME.  Hope this helps somebody else besides me.

13 Aug 2009

Fun With Wacky JavaScript Type Comparison

7 Comments Uncategorized

I recently had a conversation with Scoot Koon (LazyCoder) over Twitter about the wacky JavaScript type comparisons that are allowed.  I was interested to see what weird oddities would come out if I compared the whole type system against it self.  So I sat down and wrote a simple JavaScript routine to do just that, and the below reference table is the output of that routine.

null undefined true false -1 0 1 NaN Infinity “” ” “ “null” “undefined” “true” “false” “-1″ “0″ “1″ “NaN” “Infinity”
null null null
undefined undefined undefined
true true true true
false false false false false false
-1 -1 -1
0 0 0 0 0 0
1 1 1 1
NaN
Infinity Infinity Infinity
“” “” “” “”
” “ ” “ ” “ ” “
“null” “null”
“undefined” “undefined”
“true” “true”
“false” “false”
“-1″ “-1″ “-1″
“0″ “0″ “0″ “0″
“1″ “1″ “1″ “1″
“NaN” “NaN”
“Infinity” “Infinity” “Infinity”

So some of the oddities that emerged to me are:

  • The word “Infinity” is equal to the type Infinity, however “true” or “false” don’t equal true or false respectively.
  • " " == 0 == false and also "" == 0 == false, however " " != ""
  • Update Just noticed that NaN != NaN but Infinity == Infinity

If you would like to try this your self, or want to add to it, here is the code that I used.

var values = [null, undefined, true, false, -1, 0, 1, NaN, Infinity, "", " ", "null", "undefined", "true", "false", "-1", "0", "1", "NaN", "Infinity"];

document.write("<table><thead><tr><th></th>")
for (var x = 0; x < values.length; x++) {
	document.write("<th>" + (x > 8 ? """ : "") + values[x] + (x > 8 ? """ : "") + "</th>");
}
document.write("</tr></thead><tbody>");
for (var i = 0; i < values.length; i++) {
	document.write("<tr>");
	document.write("<th>" + (i > 8 ? """ : "") + values[i] + (i > 8 ? """ : "") + "</th>");

	for (var j = 0; j < values.length; j++) {
		var output = values[i] == values[j];

		document.write("<td style="text-align:center;" + (i == j ? "background-color:black;" : (output ? "background-color:green;color:#00AF33;" : "color:#e0e0e0;")) + "">");
		document.write(output ? (i > 8 ? """ : "") + values[i] + (i > 8 ? """ : "") : "--");
		document.write("</td>");
	}

	document.write("</tr>");
}
document.write("</tbody></table>");

I think Scott really hit the nail on the head when he said this about JavaScript coercion.

LazyCoder (Scott Koon) on JavaScript Coercion

10 Aug 2009

Recession Proof Your Programming Skills (Listmania-ed)

1 Comment Uncategorized

Found this great new, well new to me, service on Amazon called Listmania. It allows you to bundle Amazon products in to a list for easy consumption. So the first list of Amazon items I thought of trying out as a Listmania list was a post a I did a while ago titled “Recession Proof Your Programming Skills

In this economy you have to do everything to keep your skills fresh and current so that employers find you a desirable hire. I really though the tips provided in 8 Ways to Recession-Proof Your Programming Career where spot on when this article came out last year. And now that the TechRepublic has released 10 kills developers will need in the next 5 years. I have decided to give you some of my favorite Wrox books that align very well to this TechRepublic article.

The Economy may or may not seem so bleek anymore depending on who you talk to, but the message is still the same, keep your skills current and marketable. That is why I put together the list originally and it is still why I am porting it to Listmania.

Click here to check out my “Recession Proof Your programming Skills” Listmania list.

I will try to keep this up to date with new books I find useful and marketable in the way of programming skills, if you have any comments or suggestions for my list please feel free to leave them below.