Category Archives: Uncategorized

Property Center Oct 2007 Update

This last week, I pushed live a pretty significant update for Property Center.  This update has been a long time in the making… damn near 9 months actually.  I’d wager that I refactored about 70% of the code for Property Center.  Let that be a lesson, if you think you may want to support localization at some point, it’s better to do it early than go back and add it later.  But anyway, the update is out there and the response has been excellent. 

I wanted to thank OrcsWeb for the amazing job they do.  I have never been so satisfied with a hosting company that i am with OrcsWeb.  They will definitely get all of my future Asp.net business.  I was updating the database and thought something went wrong.  So, I tried and failed to restore to a backed up version.  At that point, I started to get worried and called their tech support.  Within three minutes, they had my database restored and everything was happy again.  Again, I tip my hat to that kind of support (especially when they have that kind of response level at 11pm).

Overall the update went really smoothly.  I’m completely satisfied with the current version of Property Center and look forward to adding additional features to the platform.

Eat, drink, and be merry

Last night, I got back from a nice vacation to Europe.  Had I not donated my camera to Germany, I would post some pictures, but what can ya do…

I spent the first 4 days in Varna, Bulgaria.  Actually, it was Golden Sands which is a small town outside of Varna.  It’s located on the Black Sea and has become quite a nice European resort town in the last few years.   I stayed in a nice hotel along the sea and can definitely see myself going there again.  Unfortunately, it was out of season by about two weeks, so next time I’ll probably go in July or August.  As far as I know, I was the only American in Golden Sands.  It seemed that Germans tend to holiday there the most.  As far as the food goes, it was pretty amazing in my opinion.  They serve a lot of fire roasted meats (pork, chicken, etc) and use earthenware to keep the meals nice and toasty.

After Golden Sands, I took a short one hour flight to Sofia.  Sofia is Bulgaria’s capital and is a nice sized city.   After checking into my room and taking a short nap, I was ready to just hang out in my room with my book.  I headed down to the hotel restaurant for a pretty tasty dinner and afterward went to the hotel bar for a drink.  While I was there, I was overheard talking with the bartender a little by a guy from the States.  Turns out that he is a director who was in town doing a feature film for the sci-fi channel.  I have to admit that it was pretty nice to speak English with someone and we ended up hanging out that night.  So instead of chilling out in my room, I ended up going out till 4am.  The next night, I had a traditional Bulgarian meal and followed it up by going out to different bars & clubs…  yet another late night, this time I got home around 6am.

A short rest later, and I found myself on a 2 hour flight to Munich.   I got into the hotel after a quick detour to a small town outside of Munich (a bit of a miscommunication between the cabby and myself) and shortly met with Kevin and Jason.  Little did I know that they were coming from a stadium where they had purchased 3 tickets to a game that night.  So, I had just enough time to put some shorts on before heading out to the Allianz Arena for a soccer match (between 1860 and FC St Pauli).  The game was awesome… the energy level at soccer games far exceeds what I’ve experienced at football and baseball combined.  Later that night, we went to Hofbrau House for a couple beers and some excellent food.  We got to the grounds around 8am on Saturday, but weren’t prepared for how busy it was going to be.  After watching the opening day Oktoberfest parade, we got into the Hippodrome tent.  Note to self… it’s considered an insult to try to pay a guard to get in.  We hung out in the Hippo for around an hour and even ran into the old servers that we met the last time.  But they were unable to help us find a seat for all 5 of us (Phil, Whitney, Kevin, Fox and myself).  So, we all left the grounds and headed to the  Viktualienmarkt beer garden.  The Viktualienmarkt beer garden serves beer from all 6 of Munich’s largest breweries, whereas other beer gardens only serve one type of beer.  Unfortunately, the night’s festivities resulted in me losing my camera… For the last day, we got up early again and headed to the Hacker Pschorr tent.  We easily got into it without a bracelet, and shared a nice table with some Germans.  Phil and I ended up being the last people to hang out, and decided to ride a coaster before leaving the grounds around midnight. 

Anyway… that’s the gist of the trip.  I was pretty wrecked from Oktoberfest, and am just feeling better today.   

Welcome Cayden

Around 6:12pm on August 14th, Cayden William Geurts was born and I became an uncle.  I’m looking forward to watching the changes as he grows and helping him with anything he needs along the way.  I took some pictures with my new camera when I was over there.  I got a Canon SD850 IS and couldn’t be happier with the small camera.  I wanted something that was small enough for me to take anywhere, and the picture quality seems pretty good.

Anyway, have a look at some of the pictures that I took while visiting Cayden, Bill, and Kari

Cayden GeurtsCayden Geurts 

My fix for “Validation of viewstate MAC failed” error in IE

Once again, I have cursed the IE team repeatedly… I am ashamed to work on web applications knowing that I have to support such a pile of shit. 

Ranting aside, I ran into an IE only issue with asp.net.  Specifically, I was getting “Validation of viewstate MAC failed” that has randomly plagued developers for years.  My issue arose for a page that has an asp.net gridview and some other controls that do an autopostback.  My page would completely load, but whenever I posted back (form submits worked, however), the app would crash in IE.  Searching the internet didn’t really yield much information and all the “solutions” didn’t fix my problem.  Well, it turns out that I had a nested form within my asp.net form (the main one with runat=”server”).  Removing the nested form fixed the issue.  I’d suggest that if you’re running into the same error, examine your markup, as firefox tends to be more lenient.

Caching for SubSonic

I’ve had some time recently to get more comfortable with SubSonic and I’m really enjoying using it.  When they add support for joins, it should rock…  and hopefully they find a way to have it co-exist and complement linq when that is released.  One thing that SubSonic seems to lack is support for caching objects.  I looked around the web, but couldn’t find a helper class/method that did what I wanted, so I whipped one up that you can use as a starting point if you’re looking for some way to cache your objects:

using System.Web;

using SubSonic;

 

namespace Util

{

    public class CacheUtil

    {

        public static ListType FetchAll<T, ListType>()

            where T : AbstractRecord<T>, new()

            where ListType : AbstractList<T, ListType>, new()

        {

            string key = typeof(T).ToString();

            object item = HttpContext.Current.Cache[key];
 

            if (item == null)

            {

                ListType collection = new ListType();

                collection.LoadAndCloseReader(AbstractRecord<T>.FetchAll());

 

                HttpContext.Current.Cache.Insert(key, collection);

                return collection;

            }

            return (ListType)item;

        }

 

        public static void ClearCache<T>()

        {

            string key = typeof(T).ToString();

            if (HttpContext.Current.Cache[key] != null)

            {

                HttpContext.Current.Cache.Remove(key);

            }

        }

    }

}

Mean Fiddler – REST services for nHibernate

I came across the Mean Fiddler project lately, and will definitely take a look at the source when I free up.  It is a replication of Microsoft’s Astoria project, but it uses nHibernate.  The new version supports XML, JSON, and HTML formatting, all http verbs (GET, PUT, POST, DELETE), and much more…

I’ve been hard at work on a pretty significant update to Property Center and haven’t really felt that I could blog about it.  The update will be released in a few weeks and I’ll continue to blog on a more normal basis again.

Upgrade to Windows XP

Well, now I’ve gone and done it… I formatted my laptop last night in order to revert back to Windows XP.  Vista was just running like a pile and really didn’t give me any added joy or features.  The laptop hasn’t run better (except possibly with my Ubuntu install) and I couldn’t be happier with this setup.  Everything feels a little snappier now.  Perhaps Vista is neat and performs well with a top of the line dual core system, but for my entry level laptop, it just wasn’t practical. 

Protoculous

I just became aware of Protoculous, a compressed version of Prototype and Script.aculo.us.  It works the same as the uncompressed version, but reduces the size of both from 215k to 131k.  Using gzip compression seems to bring it down to around 32k.  It’s currently in my development branch and I plan on using it with the next major update for Property Center.  If you’re using Prototype but not Script.aculo.us, I’d suggest having a look at Protoculous anyway.  He includes a compressed version of just Prototype that reduces the size from 96k to 59k.  Gzip compression continues to reduce that to around 16k.
 

Firefox and XML Parsing Error: no element found

I was receiving the following error with only Firefox: XML Parsing Error: no element found.  Basically, I was trying to visit a page that has no content, with Ajax.Request.  The requested page performs a passive operation on the server, using just query string parameters, and it is not meant to return content.  Since my doc type is xhtml, Firefox thinks that the document is an xml document and throws an error because it contains no data.  So, as a quick fix, I just added this as the content of the page.

<html xmlns=”http://www.w3.org/1999/xhtml”>

    <head><title></title></head>

    <body></body>

</html>

 

That fixes things, and since I don’t expect a return value, it’s ignored by my app.  Hope it helps someone tracking down the same issue.