“There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.”
- C.A.R. Hoare
“There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.”
- C.A.R. Hoare
One of the recommendations to improve your web application performance is to use a CDN(Content Delivery Network). This allows you to load common files(like for example jQuery) from the CDN server instead of your own. Extra advantage is that if the user already loaded the same script for another site, it’s still available in the browser cache.
But what if the CDN you’re using goes down? To fix this you can use a CDN fallback. For more details I recommend reading Scott Hanselmans post on the subject.
The ASP.NET team added a CDN fallback feature to the latest (prerelease) version of the ASP.NET Web Optimizations library. To use it, specify a CdnFallBackExpression. This expression will be checked and if the expression fails, the fallback URL will be used(a local reference to jQuery in this sample):
Team Foundation Server always allowed you to directly browse to a specific work item by calling a very specific URL. In Team Foundation Server 2012, this URL has changed to
http://tfsservername:8080/tfs/web/wi.aspx?pcguid={collectionguid}&id={workitemid}
Replace the {workitemid} part by the id of the work item and the {collectionguid} part by the GUID of your TFS collection.
The easiest way to know the collection GUID(without querying the TFS configuration database directly) is to follow the steps below:
One of the features that Entity Framework offers is Explicit Loading. This allows you to lazily load related entities, even with lazy loading disabled. The only difference is that you need a explicit call to do it(by using the Load method on the related entity’s entry):
But what if you want to filter the child results you get back. For example, imagine that you only want to know the female students in your class(no idea why you would want to know thisLet’s try to change our code to do this:
However if we look at the results we get back, it still contains all students. To enable filtering when using explicit loading, you’ll have to make sure that LazyLoading is disabled. If we change the code to incorporate this, it will work as expected:
There are multiple ways to see which users are connected to your SQL Server database. Probably the easiest way is to use the built in stored procedure called sp_who2.
To use it, execute the following steps:
After upgrading a customers TFS environment to Team Foundation Server 2012(Update 2), some minor issues were found. One of the more interesting issues was the following one:
When opening the Team Foundation Server Web Access, a specific work item query always failed with the following JavaScript error:
Work item link type end '' does not exist.TFS.WorkItemTracking.LinkTypeEndDoesNotExistException: Work item link type end '' does not exist.
at findLinkTypeEnd (http://servername:8080/tfs/_static/tfs/11/_scripts/TFS/TFS.WorkItemTracking.min.js?__loc=en-US:4:28677)
at getColumnValue (http://servername:8080/tfs/_static/tfs/11/_scripts/TFS/TFS.WorkItemTracking.Controls.Query.min.js?__loc=en-US:4:30154)
at getColumnText (http://servername:8080/tfs/_static/tfs/11/_scripts/TFS/TFS.UI.Controls.Grids.min.js?__loc=en-US:4:12128)
at _drawCell (http://servername:8080/tfs/_static/tfs/11/_scripts/TFS/TFS.UI.Controls.Grids.min.js?__loc=en-US:4:10896)
at _updateRow (http://servername:8080/tfs/_static/tfs/11/_scripts/TFS/TFS.UI.Controls.Grids.min.js?__loc=en-US:4:10331)
at _updateRow (http://servername:8080/tfs/_static/tfs/11/_scripts/TFS/TFS.WorkItemTracking.Controls.Query.min.js?__loc=en-US:4:40857)
at _drawRows (http://servername:8080/tfs/_static/tfs/11/_scripts/TFS/TFS.UI.Controls.Grids.min.js?__loc=en-US:4:8529)
at _updateViewport (http://servername:8080/tfs/_static/tfs/11/_scripts/TFS/TFS.UI.Controls.Grids.min.js?__loc=en-US:4:30553)
at _redraw (http://servername:8080/tfs/_static/tfs/11/_scripts/TFS/TFS.UI.Controls.Grids.min.js?__loc=en-US:4:32717)
at redraw (http://servername:8080/tfs/_static/tfs/11/_scripts/TFS/TFS.UI.Controls.Grids.min.js?__loc=en-US:4:11986)
After this happens, everything else on the webpage starts to fail too and the only way to solve this is by doing a full page refresh.
The strange thing was that when opening the same work item query using Team Explorer, it just worked. This set me in the wrong direction because it made me think that the issue was related to the web access and not to the work item query itself.
But in the end I found it, the work item query was using the LinkType column which is not available in TFS 2012. To remove this column, execute the following steps:
While converting and merging some SharePoint sites, I created some PowerShell scripts to speed up the process.
In case I’ll ever need them again, I post them here: