Archive for .Net

TechED 2006: Day 1

// June 13th, 2006 // No Comments » // .Net, General, TechEd 2006

So the weekend was a lot of rain but nice anyway. Saturday we walked around for quite some time and checked out some stores in down town Boston. My shoes went all wet after and hour or so, but since it wasn’t really cold it didn’t matter.

I’ll skip the other details of the weekend and jump right to todays action at TechEd. First of all I just have to mention all the food and drinks that are served all the time. Like most things in this country it way out of proportion. There is water, Pepsi, juice, cookies, ice cream, candy bars, chips etc etc available all the time. Amazing…

The main topic we had selected for todays session was the Windows Workflow Foundation (WWF), and I think we got what we came for. I’m going to use some of that material at an internal presentation at my local office when I get back to Sweden. The last session of the day was about pre alpha stuff concerning integrating ASP.NET and WWF and that was just not that interesting. I also attended a “SQL Server 2005 tips & tricks” session that was really good and the guy who led the session was hilarious.

We rounded of the day but snagging SWAG at the reception that was held after the sessions ended. I think I’ll probably dump half of the stuff before packing my bags (a lot of XL t-shirts won’t do me any good).

I’m going to try to catch a little bit more sleep this night since TechEd is (according to the SQL Server tips & tricks guy) “a real marathon”. Hope to give you another report tomorrow. Don’t forget to check out the photo section for some images!

Windows Services, timers and threading

// January 13th, 2006 // No Comments » // .Net

I recently moved a legacy VB6 Forms application to a more suitable Windows Service app. I wrote the new Windows Service in VB.Net.

Now, the application itself performs a few simple tasks. It checks a Oracle database table and executes shell command with data from the table. It also updates the database with a few status values depending on the success of the shell commands. Since I have little experience in writing Windows Services, I turned to good ol’ google.com and found some samples.

According to these samples I was to use a timer that started in the OnStart event of the service app and fired a given method at a interval. Since this was similar to what I wanted, I went for it and created the service using a timer. Big mistake.

Well, at first everything looked fine. The timer fired the method at the given interval. Only problem is that the timer creates new threads for each method call, which was NOT what I intended. After reading this great article I was able to get the service running in a single thread, thus waiting for each of the method runs to complete before the next was executed.

The lesson here is to think twice before using the timer component in a Windows Service. It might be perfectly fine for some task, but be aware of the threading problem.

That’s all for now folks…

Subversion and Trac

// April 12th, 2005 // No Comments » // .Net

If you are still using Microsoft Visual Source Safe you need to read this badly! I’ve been waiting for Microsoft to release some totally overhauled version of Source Safe. The product has not changed in years and to be honest it really do suck. I have heard from several people that not even Microsoft themselves use it.

I myself recently switched to a superb product called Subversion. Now I can access my code from anywhere and the disconnected model in Subversion (as with cvs) is just great! For users of Source Safe it takes a few hours to get used to the paradigm, but once you’ve gotten past that there is no turning back.

And there is more! If you need a documentation tracker management tool and a web version of you repository, look no further than to Trac! I’ll let the developer describe it for you:

Trac is an enhanced wiki and issue tracking system for software development projects.
Trac uses a minimalistic approach to web-based software project management. Our mission; to help developers write great software while staying out of the way. Trac should impose as little as possible on a teams established development process and policies.
All aspects of Trac have been designed with one single goal, to simplify tracking and communication of software issues, enhancements and monitoring overall progress.

What is Trac?

  • An integrated system for managing software projects
  • An enhanced wiki
  • A flexible web-based issue tracker
  • An interface to the
  • Subversion revision control system
  • Of course both Subversion and Trac is totally free open source software. If you haven’t tried it, download it today and throw out Source Safe! You wont regret it