Ian Blackburn

Web

The Amazing Album Cover Atlas - now on codeplex

http://www.codeplex.com/TAACA http://theamazingalbumcoveratlas.org/ If you would like to get involved, please let me know and I will add you as a developer. Cheers Ian Technorati Tags: Virtual Earth,VIEWS

Silverlight Wcf: The remote server returned an unexpected response: (404) Not Found.

Keep getting this error on a Silverlight 2 B2 project that is referencing a WCF service in a Web Site (not web project). There doesn't seem to be any reason for it, and it happens intermittently, however the workaround I have for it currently is to simple open up the cs class for the service and make any edit (e.g. just add a comment line) and then build.  This seems to fix it for a while. Hope there is a better solution long term, or a fix for this somewhere... Ian   Technorati Tags: Wcf,Silverlight

The Amazing Album Cover Atlas

http://theamazingalbumcoveratlas.org/ The excellent Word Magazine recently created an album cover atlas which shows locations of famous album covers.  Cool idea, but I didn't like the basic google maps interface.  So as an exercise and to also help spike out some work we are doing on www.lovecleanstreets.org I created a quick Virtual Earth and Silverlight version that make use of the VIEWS VE managed wrapper for Silverlight. Luckily the original developer, Ian Reeves used a REST service to get the data, so I was able to work with the same live data for my project.  There was no...

Being enticed by Live Mesh

Live Mesh is in early days yet, but having had it installed for a while, I am starting to see the possibilities.  The mobile web client is now available (though the full mobile client is still "coming soon") at http://m.mesh.com and using this to upload an image and then see it appear almost instantly on your other devices is compelling. The real power of Mesh will come with the api - then we can start to really create apps that live on and offline easily.  I am eagerly anticipating when that will be available (my guess: the PDC).  In...

Apple's Mobile Me == Windows Me (well the logo at least)

Apple just announce MobileMe for push email, contacts and calendars for data in the cloud.  Interesting stuff - but the logo?  Hmmm.....   ==   Cheers Ian Technorati Tags: MobileMe,Windows Me

Bridging Web Service Calls in Silverlight

For security reasons, the Silverlight version 2 runtime restricts access to certain classes of URLs from the WebClient and HTTP classes in the System.Net namespace.  The main requirement is that the services you want to use should implement either crossdomain.xml (which is the Flash policy file) or clientaccesspolicy.xml (which is the Silverlight one).  If the service you want to use does not implement one of these then you can't use Silverlight to access it. However such restrictions are not present when using WebClient on the server, so you can easily create a bridge service that your Silverlight client can use....

Simple FriendFeed C# User Control

We use a simple Friend Feed user control on our home page.  We have found this a great way to share "filtered" information that is relevant to our customers.  What we have done is created a FriendFeed account called bbits, which we share things into (via google reader and other feeds).  The user control then picks the friendfeed up and displays this in a gridview. When we did this FriendFeed didn't have any widgets, which they do have now, (and here) so if you prefer to use those rather than a c# user control go visit those...

WCF: "a non-empty contract name must be specified"

This error had me baffled today, and I could find little reference to it from Google or Live Search. It was the result of creating a simple WCF Service with two methods as follows and then trying to add a reference to it from Silverlight 2: [ServiceContract] public interface IWcfService { [OperationContract] string HelloWorld(string name); [OperationContract] List<Person> GetPeople(); }   public class WcfService : IWcfService { public string HelloWorld(string name) { return "Hello World " + name; } ...

Using ASP.NET Routing Independent of MVC - passing parameters to the page

Mike Ormond has a nice post about how to use the Asp.Net routing capabilities of Asp.Net MVC, in your standard webforms sites. In his example Mike goes through the essentials of how to set this up in Application_start and how to create and register your own IRouteHandler.  Mike's example explains this really well with a simple example of routing a single parameter to a matching aspx page as follows: URL ...

Virtual Earth 3d in the UK

I have noticed that more and more places in the UK are getting the 3D treatment in Virtual Earth, but there doesn't seem to be a list of all of them (at least I couldn't find one).  The UK models do not yet support the recent enhancements that some of the US cities have (such as Denver or Las Vegas) where vegetation is modelled as well as the buildings, but I expect that it is just a matter of time. So anyway I have created a collection of places in the UK where I have spotted 3D models - bear in...

Silverlight ObservableCollections from WCF and Linq to Sql

I have a ListBox in a Silverlight 2.0 app that is bound to some data coming from a WCF service that is returned from Linq to Sql.  The service is simplicity itself:   public List<CourseSection> GetCourseSections() { CoursesDataContext db = new CoursesDataContext(); return db.CourseSections.ToList(); }   Note: you have to mark your DataContext Serialization Mode as Unidirectional for the above to work (as shown)   I added a Service Reference to this from Silverlight and bound the data to a ListBox: private void Button_Click(object sender, RoutedEventArgs e) { CoursesService.CourseServiceClient client = new CourseBuilder.CoursesService.CourseServiceClient(); client.GetCourseSectionsCompleted +=          ...

Missing WFC Service Configuration Editor?

When you create a WCF Service in  VS 2008, it writes the service config into web.config. Usually you can right click on web.config in Solution Explorer and select Edit WCF Configuration. However I have noticed that the context menu item does not always show up.  The answer: Select Tools > Wcf Service Configuration Editor instead; this will bring up the editor with nothing loaded, so you will then need to open the relevant config file.  However, just starting the editor seems to be enough to remind Visual Studio about that context menu item, so just exit the editor and go back and...

Windows Live IM Control - easy "Live Chat" on your web site

The Windows Live IM control is a very easy way to add a "live chat" feature to your web site. You can either use the server control that is in the Windows Live Tools for Visual Studio, or you can host the control with some html you can generate automatically Whichever way you create the control, you "hardwire" it to a particular Live ID who then receives the incoming messages (via Live Messenger) - this user also needs to accept that their current status will be shown on the web site. While testing make sure you don't login to the full IM and...

Silverlight 1.0 Image Rotator with Ajax

Silverlight 2.0 might be all the fashion but 1.0 is released and out there, so there is value in using it purely for the wider reach and acceptance of users who are happier to  install the released plugin. So here is a easy little app you can write your self to give you an image rotator with click through and whatever logic you want for the weighting of the images. It fits together as follows: A Silverlight Xaml page with some JavaScript to control it An Asp.Net web page with the Script manager from the...

IE8: Principles vs Pragmatism

Joel Spolsky has an entertaining and thought provoking read on why IE8 renders Google maps and live maps so poorly.  Actually it is much more than that and Joel does a great job of explaining the battle between having IE8 default to the new "standard" rendering model, or to the old IE7 one.  He concludes: You see? No right answer.  As usual, the idealists are 100% right in principle and, as usual, the pragmatists are right in practice. The flames will continue for years. This debate precisely splits the world in two. If you have a way to buy stock in...

Learning Linq with LINQPad

If you are getting into LINQ - then this free, copy and run app, is a great way to play with it. It's a companion to C# 3.0 in a Nutshell but it is valuable without the book, and comes with 200 samples! Recommended!   Cheers   Ian Technorati Tags: Linq,LinqPad,C#,Nutshell

Expression Web 2 - some nice new features

Gary Pretty has a detailed post on some of the new features in Expression Web 2  - I hadn't realised there was so much goodness in it!   Gary lists the following:  PHP Support - PHP Intellisense and syntax highlighting, and previewing of PHP sites locally, without the need for a separately installed web server ASP.Net & AJAX Controls  - full support for the standard ASP.Net Ajax controls to simply drag and drop them into your page Silverlight 1.0, Windows Media & Flash -  drop your Silverlight 1.0 applications straight...

Exporting GeoRSS from a Virtual Earth Collection

There is currently no api method for turning a Virtual Earth Collection from maps.live.com into a GeoRss file. However there is a workaround that you can use as follows: Open your collection on maps.live.com Click the Share button and select either "Send in e-mail" or "Copy to clipboard" - what you want is the URL for the collection Visit the URL in the clipboard or the e-mail - it will be something like: http://maps.live.com/?v=2&cid=FB8B852EF1AB0B35!519&encType=1  When the collection is displayed you will see a Subscribe link at...

Automatically Scaling Content in Full Screen Mode in Silverlight 2

Technorati Tags: silverlight,silverlight 2.0 Silverlight has great full-screen support, and it is a simple matter to switch to full screen by setting the IsFullScreen property of the content object as follows.  Note for security reasons this can only be done in response to user input; note also that this code has changed from version 1.1 alpha   //get the plugin content object System.Windows.Interop.Content content = Application.Current.Host.Content; public Page() { InitializeComponent(); // wire up key down and full screen changed events this.KeyDown += new KeyEventHandler(Page_KeyDown); content.FullScreenChanged += new EventHandler(Content_FullScreenChanged); } void Page_KeyDown(object...