Monthly Archives: April 2008

Facebook wants to know what client library you use

If you’ve downloaded either the Facebook Developer Toolkit or Facebook.NET Starter Kits I recommend voting in Facebook’s poll regarding which client library you use. It seems to me there’s no good reason Facebook shouldn’t provide an ASP.NET support on par with PHP though I’m biased. Here is the blog post about the poll.

Heck, even if you haven’t downloaded my starter kits but you do ASP.NET development be sure to vote!

Windows Live Mesh – Administrators not allowed?

So this is a new twist…

I decided to take a peek at Microsoft’s new Windows Live Mesh and upon attempting to install the client for Devices got this error message:

Product does not support running under an elevated administrator account or with UAC disabled. 
Now, I don’t know about you but I’d be hard pressed to think of someone I know running Vista who hasn’t $g(disabled UAC). Anyway, I switch my account to Power User and install the client which gives me this message hovering over my tray:

Some updates were not configured

Pressing forward I click on the Mesh icon in my tray and see this:

Windows Live Mesh tray application

Now, I recognize the little colorful shield next to Configure Live Mesh Report Desktop means it requires elevated privileges. I click the link and get the above error window again. So, I exit live Mesh, click on the Start menu, type “mesh” then right click to “Run as Administrator”:

Run Live Mesh as Administrator

I return to the above Live Mesh window and click the “Configure Live Mesh Remote Desktop” link and:

Some updates were not configured

So much for living on the edge now, back to work!

Anyone else have better luck?

URL rewriting in ASP.NET and web.config settings


The other day I blogged about potentially switching to blogengine.net but one of the major issues is ensuring the URL’s I have in dasBlog either continue to work or redirect accordingly. To that end, I started investigating URL rewriters for ASP.NET and found this post of ScottGu’s very helpful. He mentioned two different Open Source rewriters and I opted for UrlRewriter.net which describes itself as:

UrlRewriter.NET is an open-source, light-weight, highly configurable URL rewriting component for ASP.NET 1.1 and 2.0. UrlRewriter.NET provides similar IIS Rewrite capabilities that the Apache web server provides with mod_rewrite and .htaccess. You don’t need to install an ISAPI Rewrite filter to use the component. Best of all, UrlRewriter.NET is free and licensed with a very permissive MIT-style licence.

I found it to be all of the above and the install/configuration to be very straightforward not to mention it has good online help and a support forum.

One caveat that I ran into though was that once installed at the root I started seeing this error in my other ASP.NET applications:

Server Error in ‘/blog’ Application.


Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly ‘Intelligencia.UrlRewriter’ or one of its dependencies. The system cannot find the file specified. (E:\web\xxxxxxx\htdocs\web.config line 11)

Source Error:

Line 9:    <system.web>
Line 10:     <httpModules>
Line 11:       <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, 
Intelligencia.UrlRewriter" />
Line 12: </httpModules> Line 13: </system.web>

Source File: E:\web\xxxxxxxx\htdocs\web.config    Line: 11


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

The Fix

To fix this I added the following to the web.config files of my other ASP.NET applications removing the new assembly dependency:

1 <system.web> 2 <httpModules> 3 <remove name="UrlRewriter" /> 4 </httpModules> 5 </system.web>

If you’re aware of other options that don’t require changes to every web.config I’d love to hear about them. At any rate, while I haven’t decided to switch blog engines yet I now have the pieces in place to do just that.

What do you use for URL rewriting particularly in a hosted environment?

Topping 1,000 RSS subscribers is perfect time to say thanks!

FeedBurner subscriber count

Today, April 16, 2008 according to FeedBurner my blog topped 1000* subscribers! I think that makes it a good time to say thanks to all those who have subscribed. So, Thank You!

I started blogging June of 2004 on Borland‘s blog server which eventually morphed into CodeGear blogs. In October of 2006 I decided to “go it alone on stevetrefethen.com and shortly thereafter started using FeedBurner to track subscribers. Here’s a graph of subscriber count:

Graph of subscriber count over time

Here’s a graph of the matching Google Analytics over the same period:

Google analytics for stevetrefethen.com

In early 2007, there was a bunch of activity surrounding Borland’s CodeGear announcement not to mention I was featured on CodeGear’s home page for awhile.

Lastly, what would a post like this be without the obligatory call to action…

If you haven’t already, Subscribe now!  🙂

* – Btw, I fully grok the fact that FeedBurner’s count may not be entirely accurate but it’s a fairly standard metric widely used on blogs so I’ll take it.

C# Source Code Formatting Preferences

I just tried checking in some C# code and ran into a merge error so I fired up $g(Araxis Merge) and noticed hundreds of unexpected changes all to whitespace! That was a bummer because I just wanted to check in and call it a night but alas, it’ll have to wait a day. Now, I know code formatting can be a religious issue but…

Here are a few examples, the actual code of which is unimportant for the purposes of this discussion:

1 public void foo(string locator) { 2 try { 3 if (selenium.IsElementPresent(locator)) 4 break; 5 } catch (Exception) { 6 } 7 }

and

1 public void foo(string locator) 2 { 3 try 4 { 5 if (selenium.IsElementPresent(locator)) 6 break; 7 } 8 catch (Exception) 9 { } 10 }

I’d call the latter more “mainstream” as the majority of Open Source projects I’ve looks at (including dasBlog, FileHelpers, RssToolkit, SubSonic, CCNET and
SubText)
all seem to align the braces with a few exceptions like the empty catch block or a single statement block. I haven’t downloaded the .NET sources yet but I’d be interested to know what Microsoft uses.

Chuck Jazdzewski, a well known ‘softie publishes a good deal of C# code on his blog formatted using the top style. A few colleagues, John Waters, Falafel‘s CTO and Adam Andersen have both blogged using the latter style, here and here respectively.

Which do you prefer? Do you consider either more “mainstream” than the other?

[Update: April 15, 2008] Added a list of OS projects I’ve looked at.

Microsoft delivers "Feature Packed" update to Visual C++ 2008

Microsoft just announced the release of Visual C++ 2008 Feature Pack which, albeit a bit late arriving, includes an impressive feature list:

  • Look & feel support for…
    • MS Office
    • Visual Studio
    • Internet Explorer
  • Visual Studio Docking
  • Auto hide windows
  • Vista theme support
  • Menu/toolbar customization
  • Shell management and more

If all this stuff is as good as it sounds it would appear Microsoft finally delivered on what Steve Teixeira said they were going to do. To top it all off the whole thing is a free download. I wonder if/when they’ll do the same for WinForms. Btw, I’d imagine this will make a few third party component vendors squirm a bit.

[UPDATE: April 10, 2008] Changed the wording of the last sentence to clarify that I meant “component” vendors based on Oliver’s comment where I think he implies that I meant CodeGear which was not the case.

Google's App Engine and Amazon's web services leading us into the clouds

S

o, Google releases Google App Engine a cloud computing service for building web applications in Python. Very cool! Over the coming days and weeks I’m sure there will be plenty of comparisons with Amazon’s Elastic Compute Cloud for us to consume. Cloud computing is an interesting model, one where I believe an independent dev tools company could flourish.

image

In fact, before leaving CodeGear I sat down with Jim Douglas to discuss ideas around web development focusing on the growing eco-system of web services that companies are publishing on what now seems like a daily basis. The discussion covered a variety of web services available as well as platforms like Facebook, all things I’ve been thinking about for a long time. To the right is a photo of a page from my developer’s journal which outlines a concept I had (in March 2006) for extending Delphi applications, including the IDE, using web services. For those of you familiar with Delphi’s ToolsAPI it’s like extending the IDE, or any Delphi application, without installing/updating binaries on the local machine. The net effect is it affords the small company the opportunity to deliver more features faster with less impact to their installed base as opposed to getting stuck on a designer. With the advent of so many different API’s from so many different companies I think there’s a good opportunity for a company to stitch these services together and provide developers an entire toolset for use within their applications.

Over the past few years we’ve really witnessed the web grow into an honest to goodness platform and I think Facebook’s salvo really helped lead the way. Initially, we’ve seen the explosion in the world of social networking which I believe is largely due to the allure of ad revenue from millions of page views fueled by viral growth.

Eventually, with things like the Elastic Compute Cloud and Google Apps Engine I believe we’ll see more mainstream web application development move “into the cloud”. Today, to leverage Amazon’s services it’s like working with Legos where you need piece things together to build out a site. One example I think illustrates the difference between Amazon and Google is Amazon’s Copy Proposal for S3 read it and let it sink in. I think that illustrates a fundamental difference between how these services are likely to evolve. On the other hand Google’s App Engine appears to be a more well rounded service which will make it interesting to watch Amazon’s response.

One thing is for sure, we won’t likely see Amazon or Google or Microsoft or IBM develop tools that would allow developers to leverage services from many different companies which is where I believe there is an opening for something creative to occur. I guess time will tell who will jump at that opportunity as it’s not likely to come from one of the big name players. I think this idea is already happing in the social network arena where sites like Plaxo and FriendFeed are aggregating data from a number of different services.

Another cool thing about moving “into the cloud” is the opportunity to use whatever OS you want on your local machine. I’m using a MacBook Pro and I’d love the opportunity to boot to the other half of my hard drive and work in OSX for awhile.

Btw, just landed in my inbox:

Thanks for signing up to try Google App Engine!  Your account has been activated, so you can begin building applications!

Looks like it could be a long night!

What’s your take on cloud computing?

Considering a switch from dasBlog to BlogEngine.NET

image

I use dasBlog for my blog engine and recently there have been discussions on the dasBlog dev mailing list about its future. The current discussion centers around starting a new code base and leveraging Microsoft’s new technology. As a result I decided to take a look around at other .NET blogging engines starting with BlogEngine.NET. As advertised it’s very easy to setup and configure which is a good sign. The next step was to import my existing blog data including posts, comments etc. and I found Merill Fernando’s post on this subject helpful, thanks Merill!

image

Merill’s post lead me to Paul Van Brenk’s dasblog BlogML importer which worked great after a minor tweak for comments without author names that caused the export to fail. Thanks to Paul for providing source thus allowing me to save time and tweak his code and get the import working. The problem was a null reference exception importing blog comments which was easily fixed with a simple check.

Once all my data was imported it allowed me to realistically play around with BlogEngine.NET and experiment a bit. While in some cases it has some advantages over dasBlog there are a few issues that would prevent me from easily switching. The first would be ensuring my existing URL’s continue to work which could prove to be a bit of a challenge. I also have a few issues with things like meta tags though that’s would be easy to fix.

Even though BlogEngine.NET does offer some flexibility not available in dasBlog I’m beginning to think that perhaps holding out to see what happens with Microsoft’s MVC framework and in the dasBlog community itself may be the best option.

I’d be interested to hear from BlogEngine.NET users their opinion and what they like/dislike about it.

Lastly, is there another Open Source ASP.NET blog engine I should consider?