Thursday, 25 February 2010

Lessons learned from NHProf

I went to another Skillsmatter event last night where Ayende was taking about some of the lessons learned from building NHProf. The points that stuck in my mind were:



* Every build goes straight to release



* Sometimes Not Invented Here is fine.



This led me to think about some other things:



* Think about the application you are building. If it's not an enterprise application the do you really need to apply enterprise patterns. I'm not saying "don't". I'm just saying think about what is appropriate for your situation.



* Ayende built his own build server. Is it appropriate for you to do the same? It depends :-) The reason that many people use things like Cruise Control, Team City etc is because they are well known tools. In companies where employees come and go the use of these standard tools means that new employees already know how these things work and can concentrate on learning the business stuff rather than the supporting infrastructure.



As an aside, Skillsmatter are doing a special rate of £75 until Sunday 28th Feb for their 3 day tutorials event. I attended this last year and I thought it provided good value for money. See their site for details.






Thursday, 30 July 2009

Report Viewer Fun And Games

I had my first foray into the Report Viewer control today. It's been a couple of hours worth of fun :-) The point of this post is to share the resolution to the two problems that wasted the most of my time.

1)An object data source may not appear in the Website Data Sources window when you try to set the object data source for a SQL Server 2005 Reporting Services report in Visual Studio 2005. I couldn't understand why the buttons in the Website Data Sources window were greyed out. It turns out to be a known bug and the hot-fix for it is at http://support.microsoft.com/kb/939768



2) The 'XXX' parameter is missing a value : There are loads of posts for this and none of the posts I read supplied the resolution that fixed my particular problem. I was trying to set the parameter of a local report in the page load handler. When I views the page I kept getting the error message. When I tried to set a breakpoint, the code was not being hit, which lead me to believe that something fundamental was happening way earlier in the process. I reasoned that there was a null check being carried out and failing the code before my code to set the parameter was being called. I wondered if there was any way to allow nulls, and there was (is).




In the Report Parameters dialogue box there is a Check box labelled Allow null value. Selecting this solved my problem.

Tuesday, 19 May 2009

ASP.NET Unit Testing and TypeMock

I've been using TypeMock since 2005 and I find it a useful tool to have in my toolbox. I don't subscribe to the "it's too powerful and too easy to do things wrong" school of thought. My take on it is that it's really powerful and is especially useful when bringing legacy code under control. Anyway, TypeMock are releasing an ASP.NET bundle. See the details below.


Unit Testing ASP.NET? ASP.NET unit testing has never been this easy.

Typemock is launching a new product for ASP.NET developers – the ASP.NET Bundle - and for the launch will be giving out FREE licenses to bloggers and their readers.

The ASP.NET Bundle is the ultimate ASP.NET unit testing solution, and offers both Typemock Isolator, a unit test tool and Ivonna, the Isolator add-on for ASP.NET unit testing, for a bargain price.

Typemock Isolator is a leading .NET unit testing tool (C# and VB.NET) for many ‘hard to test’ technologies such as SharePoint, ASP.NET, MVC, WCF, WPF, Silverlight and more. Note that for unit testing Silverlight there is an open source Isolator add-on called SilverUnit.

The first 60 bloggers who will blog this text in their blog and tell us about it, will get a Free Isolator ASP.NET Bundle license (Typemock Isolator + Ivonna). If you post this in an ASP.NET dedicated blog, you'll get a license automatically (even if more than 60 submit) during the first week of this announcement.

Also 8 bloggers will get an additional 2 licenses (each) to give away to their readers / friends.

Go ahead, click the following link for more information on how to get your free license.


Wednesday, 13 May 2009

Monday, 27 April 2009

Progressive.Net Tutorials 2009

I'm looking forward to attending this event in May. It looks like there will be some interesting sessions and it'll be good to catch up with London friends.

WebTech eXchange 2009

Thursday, 12 March 2009

error ASPPARSE: Could not load type 'Global'

I'm working on an ASP.Net 2.0 project using VS 2005 and so I thought I'd take the opportunity to try out the Visual Studio 2005 Web Deployment Projects (WDP).

All went well up until the point I tried to build the deployment project. The build failed with the "error ASPPARSE: Could not load type 'Global' " error. I looked for a solution on the Web and It turns out that Asp_net compiler wants a "bin" folder with all the dll references inside the project (the one you are tyring to build). After some more research I found the answer to my problem.

There is an element in the wdproj file (the MSBuild file created by the WDP) called 'SourceWebPhysicalPath'. This contained the value '..\PDR' (where PDR is the name of my Web application). Using a text editor to change this value to '..\PDR\bin' fixed the problem. The complete element is <SourceWebPhysicalPath>..\PDR\bin</SourceWebPhysicalPath>

Thursday, 5 February 2009

Watchout, there's a Host about

I was pairing with Remco (start a blog man!) today and we came across an interesting assumption. The code we were looking at created a redirect URL using the following code.


return Redirect("http://" + Request.Url.Host + "/" + url.Trim('/'));

'Host' returns the "host component of this instance". No bad thing, until you start to test on a server using a port other than port 80. Your code may well break because the URL you are constructing doesn't contain the port number that your Web application is running on. To fix this you can use Request.Url.Authority. 'Authority' return the "DNS host name or IP address and the port number for a server".