I was debugging some ASP.Net 2.0 code that renders a PDF to the response buffer of a page request, using code like this (byte[] bytes is the PDF file, which was rendered using Microsoft Reporting Services Web Service interface) :

public static void DownloadBytes(byte[] bytes, string mimeType, string fileName) {
  HttpResponse r = HttpContext.Current.Response;
  r.ContentType = mimeType;
  r.AppendHeader("Content-Disposition", "attachment;filename=" + fileName);
  r.BinaryWrite(bytes);
  r.Flush();
  r.End();
}

I found that an exception was being raised when r.End() was called, and it turned out to be a sneaky little guy by the name ...








Falafel software is proud to announce the successful launch of version 2.0 of its custom built ERP system Velocity. Velocity handles billions of dollars of business for America’s leading organic produce company. Version 2.0 provided a rewrite of key parts of the user interface, using Web 2.0 technology like AJAX and Web Services to provide the data entry performance of a desktop application combined with the ease of deployment and central manageability of a web application. The system handles hundreds of users, hundreds of thousands of sales orders and invoices, and provides 24/7 availability and high performance using a scale-out ...

If you need to share resources across multiple pages you can use global resources as opposed to the local resources shown in the previous blog. Global resources are implemented using explicit binding, i.e. server tags like this one:

<%$ Resources:MyGlobalResources, OrderButtonText %>

The syntax is <% Resources:Class, ResourceID %> where Class is the name of the resource file, but without the culture and "resx" extensions.  ResourceID is the name of the entry in the resource file.

By the way, you can use explicit syntax for local resources, but must use explicit syntax for global resources.

The basic ...

I just started out writing some software for a cool device, it's a Suunto Team POD that connects to up to 30 heart rate chest belts wirelessly, and allows you to collect heart rates from all of the belts simultaneously in real time, using a SDK. The hardware comes with some standard Suunto software that I used on my Vista machine to check that it was all working ok, and indeed it was:

The device hooks up using a USB cable, and Suunto provides a USB Serial Driver, that makes it show up as a COM port.

Happy that the ...

I had the privilege of attending a two-day training for Expression Design and Expression Blend this week in San Jose, CA.  The trainer, Joshua, was knowledgeable and fun to learn from.  We enjoyed his training and personality.

Unfortunately, the product is just NOT ready for prime time.  I was shocked! Really shocked! Poor guy had to apologize almost every three minutes for two days on how the product works and why he has to do things in a very awkward way to get it to behave.
First the IDE is not intuitive at all.  I thought, hey I am a ...

ASP.NET 2.0 has a rich set of localization features built-in. Early in the ASP.NET 1x lifecycle we "rolled our own" using an HTTP handler that reflected for a [localize] tag, looked up the control name in a resource file and assigned the localized value.  I prefer out-of-the-box solutions though when available and the MS resource provider model approach provides enough flexibility to be worthwhile.

ASP.NET 2.0 Localization adds two new resource flavors: local and global resources.  Local resources are used for controls on a specific page. The resources are located in the ASP.NET App_LocalResources folder with the same name as the page you're ...

I have spent the last few days trying to install Visual Studio 2008 a.k.a. Orcas Beta 2. The download page is here.

The basic idea is that you download a virtual machine that has both the OS (Windows Server 2003) and Orcas preloaded. First, you download a base file called VSCTPBase.exe, which you unpack to get a virtual hard drive. Then, you download 7 RAR files. The first one is self extracting and extracts itself and the rest of them, and then builds a differencing disk which is added to the initial virtual hard drive to create the final ...

One of the problems we've encountered while using Selenium to execute automated tests feels like it's related to timing, and that's when we use the "IsElementPresent" method followed immediately by a command to get the contents in that element. The results are very intermittent - sometimes, even when we KNOW that there should be something there, we're unable to find it, almost like the element started getting rendered, but didn't get populated yet.

The problem, then, is that when you expect that there's going to be data there, it would be nice to make sure that there actually is before ...

I was configuring Custom Errors in the web.config of my ASP.Net 2.0 application, and set it up as follows:

<customErrors mode="remoteOnly" defaultRedirect="~/Error.aspx">
  <error statusCode="403" redirect="~/AccessDenied.aspx" />
  <error statusCode="404" redirect="~/Error404.aspx" />
</customErrors>

I had found the syntax on MSDN. To my surprise, the applicationm wouldn't start, it told me there was something wrong with the value of the mode attribute.

So I went back to MSDN and noticed I had looked at the .NET Framework 1.1 documentation. Clicking on the corresponding 2.0 documentation, I found it had changed to ...




I've been looking at the "Scheduler" entry on the DNN Host menu for quite a while now, thinking about looking into it further and wondering how I might be able to take advantage of the promise that's there.

First, the bad news: the scheduler only checks if there's a scheduled activity that needs to be run when the DNN server gets hit. So, for instance, if you have a task that you want to run every ten minutes, and nobody hits your website for three hours in the middle of the night, the task will not run until the next ...

I spent some time banging my head trying to get Selenium to select an item from a Telerik RadCombobox for ASP.NET. It turns out I was very close but missing one small detail and that was to call mouseOver on the item I was trying to select before calling Click. I evetnually found the answer on the Teleik forums here. Falafel Software is a big fan of Telerik and it's nice to know their using Selenium to test their controls.