| Subcribe via RSS

Amazon CloudFront – Replacing the content database

Amazon launch of Cloudfront, a tightly integrated content delivery service built over their S3 offering promises content delivery routed to the nearest edge location, giving optimal performance to the content user. This extension to S3 should get the content management system (CMS) providers and companies such as Akamai thinking. The service will allow the database (currently at the heart of any CMS) to be decoupled and replaced instead with Cloudfront; a potentially painless process for any well designed CMS. Having Cloudfront at the heart of content delivery provides all the benefits of cost and scalability of S3, together with a slick API and the big performance advantages (leveraging Amazons ever growing infrastructure, The Edge locations). I hope to see some good content service applications appearing using this technology, hopefully EPiServer will be one of them.

Tags: ,

ASUS Eee PC 900 BF001 Netbook, Linux Preloaded, 1GB RAM

November 16th, 2008 | No Comments | Posted in open source, technology

I recently got this netbook as a replacement for my Nokia N810; the new version of the Nokia comes out next year, so i wanted to get the best price for it now.

I’ve had the Eee for a week now and must say that i’ve found it to be better than expected. It’s main use has been to browse the web (firefox), view pictures with (Picasa) and write some short paragraphs (Google Docs/Star Office). It does each of these admirably. When looking at this low price range, i also viewed the Acer Aspire One A150L. It’s small form was great, but the trackpad, with its side buttons was a little annoying, so i went with the Eee. At £195, it’s worth every penny and in 6 months you won’t feel bad buying the latest, lightest model.

Tags: ,

Chinese characters appearing incorrectly in Excel when generated by an ASP.Net page

November 15th, 2008 | No Comments | Posted in .net, software development

We recently launched a site that required an excel download to be generated with complex and simplified Chinese characters. In producing this we had issues presenting the Chinese – they would come out as garbage. It was strange as if you saved in notepad and re-opened in excel it would be fine, so the problem looked to lie with Excels handling of Unicode. After trying various encoding combinations, without luck we found that the stream required a byte leader to let excel know it was about to receive Unicode.

string attachment = “attachment; filename=Inventory” + DateTime.Now.Month + “-” + DateTime.Now.Year + “.xls”;
string filename = “Inventory” + DateTime.Now.Month + ” – ” + DateTime.Now.Year + “.xls”;
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.ContentType = “application/vnd.ms-excel”;
HttpContext.Current.Response.ContentEncoding = Encoding.Unicode;
HttpContext.Current.Response.AddHeader(“content-disposition”, attachment);

‘this is the key part of the fix

var b = Encoding.Unicode.GetPreamble();
HttpContext.Current.Response.BinaryWrite(b);
//Write your code here to write the file
// i.e. HttpContext.Current.Response.Write(“column1, column2, column3”);
HttpContext.Current.Response.End();

hope this helps, as it took as while to figure this out.

Tags: , ,