Ken Robertson's Blog

Ramblings of a .NET developer
Final spyware solution

Last night, had the unpleasant pleasure of contracting some pretty nasty spyware.  Even through I've run numerous spyware removal tools, I still notice a few things here and there.  I'm kind of a software purist... never believe anything is completely gone unless you format and reinstall.  The problem with that is it is a major pain.

Finally think I've figured out how to keep my setup fully clean without the hassle of reinstalling.  Use Norton Ghost to create an image of my hard drive after a fresh install with all my applications.  Anytime I manage to catch something or screw something up, simply restore the image and I am back to where I was in no time.

I have two hard drives, a 36gb and a 200gb that I use for movies/mp3s/archived data/virtual machines.  Cleaned that drive up, since I had a lot of old crap.  Use it to store my Ghost images and also going to have my Favorites and My Documents redirected to it.  The idea is all programs on the main drive, all data on the second drive.  That way at any point, I can restore the image and be right back where I was.  I typically don't install many new programs, but if I do, I can easily do a differential image or simply take a new snapshot.

After farting around for a while, I managed to get a BartPE bootable Windows XP image together with Ghost and everything I need.  I couldn't use the Ghost Boot Wizard, since my system has no floppy drive and I don't have a USB floppy (who uses floppies?).  And it doesn't support burning them to CD.  Also, my Dell system uses Serial ATA drives, so I'd need those drives.  Used my Dell XP CD to generate the BartPE image, copied over the drivers it missed, and tested it out with Virtual PC.  Once I got it to boot in Virtual PC, burned it to disk, rebooted, and quick-and-easy Ghost imaging.

So... kind of an unproductive day after dealing with spyware, dealing with issues from the Community Server 1.0beta3 release, cleaning out my system, and setting up Ghost.  But... should be top of my game again soon.  Just need to find the time to reformat this weekend.

Getting the run around

One funny thing is that while Telligent is still a rather small company, we already have 3 Scotts.  Yesterday, I needed to update one of our components and the latest version wasn't in Vault.  So I IM Scott1.  Scott1 says to talk to Scott2, since he had the latest version.  So I email Scott2, and Scott2 says he doesn't have it, Scott3 does.  So I IM Scott3, and Scott3 says yeah, he has it, he'd emailed it to Scott1 a couple of days ago.  So he just forwards it to me and all is well.

If a 4th Scott joins us, I think some action will have to be taken.  He won't be able to go by Scott, we should make him go by Bob or John, or something.

Not making a habit of this...

Not going to let myself make a habit of staying up until 4am working.  Especially since last night, I stayed up until about 3am working.

Up working so late because I really wanted to work on improving the way metadata (EXIF data) is stored in Community Server :: Gallery.  One user on had suggested that we add an option to order pictures based on the EXIF picture date value.  This was definitely a great idea, since even though I haven't used CS on a live site, I certainly have noticed the issue with sorting by upload date and upload a bunch of your digital photos.

I want everything ordered by dates, since I have my misc folders that randomly get new stuff, and I want the most recent ones up on top.  But for my digital photos, I want those in the order I took them.  To do that, I basically have to upload them in reverse of the order that I took them.  Not very logical.

I don't want to override the post date with the picture date, since I want to use the "top 5 most recent pictures" module and if I did that, if I uploaded a pic that was taken a year ago of my cousin Bob, then it wouldn't show up, even though I just uploaded it.  And I need to be able to query the EXIF date in the database to handle the paging right, but it is stored in a serialized string with all the other EXIF data.

Solution?  Branch the metadata off into a separate table just for metadata.  But I wanted to take it further than that.  I want to be able to format fields like date/times to the user's selected format... but I don't want to have to parse it from a string to a DateTime.  If I put a DateTime into the DB, I want a DateTime back.  Same for string, int, float, double, whatever.  Also, looking out to expanding CS even further, there might be a use sometime for this kind of thing.

At first, I was thinking about converting everything to a byte array and store it that way.  However, we can't use a BinaryFormatter since it won't work under medium trust (one of our goals is to work in medium trust).  Then was trying to convert them using uglier methods, which didn't work.  Finally I woke up and released I could use a string and store the original type as well.  Convert everything to a string (DateTimes go to 2004-12-31 04:12:31), store the type (System.DateTime), and then use Convert.ChangeType() to get the original object back.  Yay.  Also serialize everything into an XML string so all the types are sent to the DB at once.

Next... work on reading the EXIF tags raw.  Using System.Drawing can to get the properties can be a huge drain, especially with some of the bulk upload tools we're working on (this thing will knock everyone's socks off... its cool... like, why didn't I think of that before cool).

Posted: Dec 31 2004, 04:18 AM by qgyen | with no comments
Filed under:
Any way to check image type and get dimensions without System.Drawing?

Anyone know of any way to test the image type and get the width/height without using the System.Drawing namespace?  I'm working on a small app that processes a lot of pictures at once and could get multiple users using it at the same time.  When I use it without doing its image calculations, it only takes max 10% of the CPU.  However, when I have it get the width/height (which I need for it to work properly) using a bitmap, it gets up to around 80% CPU usage.  Big jump!

I'd found this java class that tests an image's type and gets the width/height by looking at its data raw, but alas, it is in Java, and converting it to .NET is too much of a pain (was trying it for a while... down to 29 errors that I know of).  When screwing around with some of the raw data, I can find the width/height in the file, but the offset it sometimes different, since it seems to depend on the size of a header that is before it.

Somebody somewhere in .NET Land must of thought of doing something like this before?

Posted: Dec 28 2004, 10:38 PM by qgyen | with 2 comment(s)
Filed under:
RepeaterPlusNone v1.0 -- Repeater + NoneTemplate

Nearly a month and a half ago, I'd posted about writing up a Repeater control that allows for a <NoneTemplate> that would be used when its datasource is empty.  I had a couple of people ask me for the source, and I'd meant to release it, but kept forgetting as things kept coming up (work, holidays, DevConnections).  So finally today I sat down, did a quick build, wrote a short sample, and zipped it up.

I've coined it RepeaterPlusNone.  We've put it to use quite well in Community Server and it works great.  So... check it out.

Posted: Dec 21 2004, 11:57 AM by qgyen | with 2 comment(s)
Filed under:
Not a good way to inspire confidence...

I recently bought a new Dell PowerEdge 1750 and yesterday I finally dropped it off at a data center for colocation.  Now, after having it hosted there for not even 24 hours, I have been unable to connect to the machine for 4 hours now.  I lost connectivity with it as I was on it, and I was just configuring which folders it should filter my spam to.  So is my confidence in this data center very high at this point?  I think not.

Community Server Beta2 Released

Beta2 of Community Server was released today over at  Be sure to check out the announcement.

This release mostly features a massive number of bug fixes.  We've gotten quite far on cranking on the various components to get them tweaked out.  It does have some new features, such as a new tabbed UI.  The tabs are not wired up yet, they mainly serve as a visual for the look and feel we are working towards.  Also, we've added a new post UI that is quite interesting.

As with any beta, there are still some issues, but with beta2, we are going to start doing more periodic releases to help ensure that fixes to bugs don't end up creating other bugs. :)

Posted: Dec 08 2004, 03:59 PM by qgyen | with 3 comment(s)
Filed under: ,
Community Server v1.0 Beta1 Released

Community Server v1.0 Beta1 was released today (ScottW's post, announcement on

So far, it has been released for about 2 hours and we've already had a flood of feedback (and bug reports, but hey, its beta).  If you have any issues with it, please check out and post in the Bugs & Issues forum on

Community Server :: Galleries differs from nGallery in a couple of ways:

  • Albums are now called Categories.  One nice thing is that a single picture can belong to multiple categories.
  • Can no longer specify a highlighted picture for a category.  The field to specify one just isn't there.  It will added in the future, but right now, it is not available.  The next release of Community Server will show a random picture in the header instead of the folder icon.
  • Cannot have subcategories, at this time.  This might get added for the next release, but a way to specify a parent just hasn't been added.
  • No watermarking feature for images.  The nGallery watermarking was a little problematic (especially with using images).  This will be coming back in the future once we can make it a little more thought out.

There are also major improvements in Community Server :: Galleries over nGallery:

  • Entirely SQL based with great caching.  In nGallery, using the XML storage, it would eat a lot of memory when you had a lot of pictures.  Using nGallery's SQL storage, it generated far too much database traffic.  Community Server keeps everything to a minimum and have put a lot of thought into caching data and figuring out what is used most often.
  • Multi-user!  Can finally configure multiple users and give them permissions as to whether or not they can upload images or not.  Can also specify whether or not they can login and view the gallery or not.
  • Ability to have multiple galleries.  You can have multiple users, each with their own galleries and pictures.  Think a .Text site, but with photos.  I'm working on a write up for the final release which will cover how to use it in a single site setup.
  • Vastly improved skinning.  Without saying, the skinning in nGallery was rather complicated and scared many people away from making their own skin (including myself!).  Community Server's is much much easier.  Just look in the ~/Themes/default/Skins/Galleries folder and the main pages you'll have to modify are Skin-GalleryDefault.ascx, Skin-ViewGallery.ascx, Skin-ViewCategory.ascx, Skin-ViewPicture.ascx, and Skin-PictureListing.ascx (should be somewhat obvious what each one is a view of).  Everything is in there and is all based on user controls.  The other files in the folder are for some of the smaller components or for the admin pages.
One of the main questions many people have is how can I migrate from nGallery to Community Server?  The answer for right now is that you can't.  We don't have converters yet for either of the components.  I have started working on a conversion tool for the Galleries and it will be available with the final release.  In the meantime, the beta is mostly intented to toy around with and isn't yet recommended to use it as a replacement.
Posted: Nov 17 2004, 03:09 PM by qgyen | with 2 comment(s)
Filed under: ,
Live at DevConnections

In Vegas this week for two purposes.  One, going to the DevConnections conference at the Madalay Bay, and two, going to my cousin's wedding this weekend.

So far, DevConnections is great.  Finally had a chance to meet Rob Howard.  Nice to actually meet the person cutting your paycheck. :)  Been to a couple great sessions.  Missed all the ones yesterday, since I was wrapped up in doing other things (like flying in), but today saw Rob's session on migrating and planning for 2.0 and went to Julia Lerman's session on new things in the base classes for 2.0.  That was great, since I hadn't seen anything on the debug visualizer.Tomorrow, looking forward to a couple more, mainly on mobile devices.  Those should be interesting.

Then these are mostly for Brain Goldfarb.  Was telling him about a group of my friends dressing up as characters from The Big Lebowski.

I'll probably upload more pictures next week... when I get my new site up and running and using Community Server beta1 (releasing it 11/15).

Posted: Nov 09 2004, 11:11 PM by qgyen | with no comments
Filed under:
Fustrated with Exchange...

I find Exchange so frustrating to work with sometimes.  It is a great application and provides vital functionality, but working with it can sometimes be a bear.

My task today: RPC via HTTP.  Something many people struggle with, from what I've seen.  I am working on getting this server colocated and I have my copy of SBS2003 Premium from the TS2 seminar I went to.  I have seriously spent probably the past 6+ hours on it.  I could not get it working at all.  Tried many different guides, many different configurations, everything.  I finally figured it must be SP1... it changes the RPC-HTTP stuff a little and it is funkier for single server installations.  So I format the drive and completely reinstall SBS2003.  Go to set it up... still doesn't work.

Finally, a stroke of "why did I think of this before".  SBS must have a guide somewhere for users to configure Outlook.  Sure enough, they do in the Remote Web Workplace.  What was my problem before?  I never installed the certificate for the server!  I don't have a trusted CA, so I needed to install the certificate so it would recognize it.

6+ hours of work, all for missing a ~30 second step.  I am done, going to bed.

More Posts « Previous page - Next page »