How to test Windows Authentication with Applications and VMware Workstation
There have been many times where I needed to test Windows Authentication (Integrated Authentication) from inside a VM. There are a few things you can do such as:
- Join the VM to a corporate domain (good luck getting this past your IT Department)
- Setup a VPN tunnel from the VPN to the domain (again – good luck with IT)
- Create your own Domain network (IT would freak if they found out about this one which makes it my favorite)
The following instructions show how to setup a mini domain network using VMware Workstation. The same thing can be accomplished if you have access to an ESX server and possibly Hyper V.
Step 1 – Setup a domain controller
Many networks are sensitive to domain controllers so this MUST be setup using the option in VMware where the network connection is a private network (meaning it can’t get outside of the local machine). The only draw back to this is applying MS patches to your domain controller. This can be done in other ways but is outside the scope of this tutorial.
1. Create a Virtual Machine with Windows 2003 or Windows 2008.
Ram Specs (sufficient for development and testing)
Win 2003 – 512 MB
Win 2008 – 768 MB
2. Setup a single NIC and set it to private network
3. Set the NIC to a static IP address
4. Use dcpromo.exe to promote your machine to the primary domain controller in a new forest
5. Make sure you set this DC as the DNS server also
6. Setup the domain as needed (user accounts,etc)
Step 2 – Setup a client machine (this can be any other Windows OS – client and server operating systems)
Now you need a client machine to add to the domain. Use the steps below to set this up.
- Create a virtual machine
- Add a second NIC to the machine set to Host Only
- Install the operating system and patch
- Setup the 2nd NIC
- Set to a static IP address in the current range (normally 192.168.xxx.xxx)
- Set the subnet to 255.255.255.0
- Set the Gateway to the host machine’s VMware Network adapter (usually 192.168.xxx.001)
- Set the DNS server (Primary only) to the DC / DNS server created in step 1
- Now join the machine to the domain
Once steps one and two are complete you now have a client machine on your private domain network that can also access your corporate network’s resource such as database servers, other websites, etc while still concealing the domain controller from the corporate network. If you need to test Integrated Authentication with database servers then you would need to create another virtual machine with a server OS using the Step 2 instructions.
With this setup you can run a Domain Controller, Client Operating System, and a web server for less than 3 GB of ram. A host machine with 4 GB of RAM would function just fine on this (given other resources were up to par).
Timer Application in WPF
After playing around with WPF over the past couple of weeks I wanted to build a small, handy application. I knew a while back some people were looking for Pomodoro Timers so I decided to build an all inclusive timer.
Here is the main application. From here you can manually enter the time, start the timer, stop the timer, reset the form, or go to the settings menu.
On the settings menu you can use the buttons to quickly set a time interval (notice the Pomo button). You can also enabled sounds to go off whenever the time expires. When you save the settings and xml file is created in the local user application folder under the TSells directory.
The sound files are wav files located in the \Sound folder. You can add additional sound files to this folder and the timer application will automatically pick them up and load them in the list for selection.
You can download the time from here Timer.zip
I’m too valuable – I can’t be replaced…..
This is a phrase we hear all to often in today’s business environment. Many individuals feel they are irreplaceable. Far too often they found out just the opposite. It’s surprising when you look at teams where a “core” team member leaves and the team does just fine or in some cases better. Did the team suffer when that person left – maybe. Maybe not. You usually can’t realize the full impact of someone leaving a team until they are gone. Every team has a “bus number”, or number of people hit by a bus that would cause a team or product to come to a stand still if those members were lost. Each team is different based on the size of the team and the specialization factor within a team. By specialization factor I mean certain core areas of a product that a select few people truly understand and work on. There are many reasons this occurs but some that come to mind quickly are (critical area, very complex stuff, and ownership).
While I don’t believe you should let anyone work on any part of your application (widget effect) I do believe more than one or two people (based on size of team) should know all of the critical components in your product. You should always have one or two backups. This leads me to my next point – and the subject of this post. Is there a such thing as being irreplaceable? I believe in certain unique circumstances there are – but normally that is not the case. If management allows the team to evolve into this scenario – then shame on them.
My favorite saying is this – “Anyone can be replaced, it’s just a matter of how much and long of an inconvenience it is to replace that person”. This “replacement factor” also includes experience / knowledge with the product / organization that you simply CANNOT buy on the open market. So the next time you hear one of the following phrases (or think it yourself) then you might want to reconsider your stance on the subject.
“I can’t be replaced – this system is too complex”.
“It would cost them way too much to replace me”.
“I’m the backbone of this team”.
Team Foundation Server(TFS) Installation woes
Well after redoing my home network I needed to reinstall a VM with a TFS server for source control. I thought it would be fairly straight forward as I had done it in the past. This time I thought I would use newer technologies (SQL 2008 vs 2005, Windows 2008 versus 2003). Boy was that a mistake. After numerous attempts to get a functioning TFS server I finally have it (3 days later).
Below is a list of failed attempts.
1. Windows 2008 and SQL 2008. Way too much custom installation and setup for source control. Microsoft has to be out of their minds when setting this up. I have done many custom installations (MS and Linux) and have to say this latest TFS attempt was the worst ever!!!! I would prefer to setup a Solaris Box and attempt multiple versions of Oracle on the same box before doing this again.
2. Windows 2003 and SQL 2005 – I went with Win 2003 so it would install Windows Sharepoint Services for me (one less step). Something happened with permission’s on one of my user accounts to my reporting services installation. Too bad it didn’t catch it in the beginning. After I few hours of trying to recover from a FAILED installation of TFS I scrapped the VM and went back to a snapshot.
3. I get everything up and running (I thought) and then the next day get a strange SQL error I can’t pinpoint. It has to do with the WSS_Configuration database. After a couple of hours or more of searching I decided a clean operating system was in order. Only about 15 minutes into the new operating system did I discover that while I applied the Service Pack for Visual Studio – it did not include the Service Pack for TFS. This caused file version errors which were the root cause of my error.
4. So now I am writing this post while waiting for the last of my service packs to be applied to TFS. Here’s hoping I can create a new project from a remote pc.
Tips for install TFS 2008 on a single server
- Use Windows 2003 (32bit)
- Use SQL 2005 SP3
- Print out the directions and follow the prerequisites exactly
- If running a VM – take a snapshot after every major software installation
- Do not skip steps
- Read the directions
- Read the directions again
- PAY CLOSE ATTENTION TO EVERY STEP IN THE PREREQ section!!!
- If the TFS installation fails – go to a backup / snapshot – do not waste your time. The installation SUCKS and does NOT recover gracefully.
Tips: MICROSOFT – please try to make TFS 2010 a little more straight forward for installation.
Change of direction – PHP here I come!!!
I have been coding C# applications (middle tier, ado.net, wpf, winforms) for a while now and wanted to move into something different for some recreational projects. I am looking at a web based technology and would prefer something other than Microsoft / Windows. I considered Ruby / Rails for a while but could not find the motivation or “wow” factor to say I have to learn that. I am sure one day this will come – but today is not the day. I was digging into an Genealogy project for my family and found a great open source project in PHP / MySQL. I installed the program and ran into a couple of errors due to the version of PHP I was running. I starting looking at the code and something came over me (the wow factor). So for the past few days I have been reading on and setting up a PHP development environment. I am going to start on Windows and then move to Ubuntu as time permits. I have capacity on my home Hyper V server so will be posting a permanent server later (using a 2003 VM with XAMPP for now).
I have experience in the past with Apache administration so this should be fairly easy to brush up on. MySQL will be a breeze as I have a lot of experience with Oracle and MSSql. The biggest thing will be the PHP / Scripting / HTML / CSS. I am green when it comes to this area but am very excited to step into this arena. I will be posting updates over the next few months as my projects / learning progress.
Note: If you have an suggestions / resources / etc that you would like to share please leave a comment. All comments welcome.
Wish me luck!
Windows Home Server Backup to the Rescue!!!
Well one week into using Windows Home Server(WHS) and it has saved me some serious time. I performed my first full system backup of my primary machine at home less than a week ago (Sunday to be exact) since it was so easy to do with WHS. I did it because my system drive (which is part of raid set) was down to one hard drive as one failed. Today while working a got the infamous blue screen of death and on reboot – a big fat red warning message telling me that my System RAID array failed.
Great. What next. Ah yes – I have a back up. But how do I restore it? A quick search on the internet revealed the WHS restoration disk. So I download it, burn it to a CD, replace the bad hard drive with a set of 250’s sitting in the closet and power up the machine.
1. A prompt asking me how much system memory I have (less than 512 or more than 512). This is OK but – why didn’t it already know this??? So I select > 512
2. It then searches for a Home Server and asks me for my password - I enter it
3. A screen pops up asking me what machine I want to restore. Sure enough my machine is in the list. I select it and then go to the next screen.
4. Problem – I can’t see my new drives. But – there is an advanced disk manager so I click it.
5. I use this to make partitions and such – Good to go – click next
6. Now I have to map my drives from the backup to the physical drives. The only gotcha here is that 100mb system partition created with Vista and Windows 7. Make sure you create one of these – or go back and run disk mgr again.
7. I map them -and click next – it’s off to the races restoring the backup. It completes in less than an hour restoring 65 Gig worth of data (on a gb network).
8. I restart the machine – everything is great.
So failure to back up and running in 90 minutes. Half of which was spent deciding what to do and getting the software. Now my only problem is getting these hard drives back to SeaGate for replacement.

Slowness with Windows 2008 R2 and Virtual Machines
In my last post I walked through my network setup. I added an additional VM to the host machine for a web server (Windows 2008 x86 SP2). After adding this I was getting extremely slow download speeds ( 1- 10 KB per second) and I have FIOS. I was even getting the problem from a machine inside the network. After a while of searching I found the solution.
Disable TCP Offload on both the HOST and the Virtual Machine.
- Open the NIC Card Properties
- Click on configure
- Under the advanced tab – turn of CheckSum Offloading
Problem Resolved.
Setting up Windows Home Server in a VM on Win 2008 R2
I have been running Windows 2008 and Hyper V since the day it was released. It has been very solid and worked well for my needs. I have now decided to use Windows Home Server for the media and family capabilities it provides. I had some decisions to make and hardware played a factor. The server I am running is a custom built PC with plenty of power. It used to run 5 virtual machines (Servers) so I am looking forward to the speed it should provide.
Server Specifications (Hardware)
- Antec P180 Case with 5 120 MM fans (yes it’s quiet too)
- ThermalTake 600W PS
- Intel Core 2 DUO E6600 Processor
- Asus P5B Premium Motherboard with Dual OnBoard Gigabit NIC’s
- 8 Gigs of DDR 800 RAM
- 2 x 320 gig SATA 2 Seagate Hard Drives (Raid 1 for System Partition)
- 4 x 640 gig SATA2 WD Hard Drives
- 2 x 500 gig USB Seagate External Hard Drives
Whew – that’s almost 4 TB of storage space. This should be sufficient.
Options
I have narrowed down my choices to the following two options.
- Install Windows Home Server directly on the Hardware
- Install Windows Server 2008 R2 x64 with Hyper V on the hardware and run Windows Home Server in a VM
I decided to go with option 2 for since WHS is 32 bit only and has a 4 gig Memory limit, is based on Windows 2003, and may limit the future expansion of the server with other virtualization needs.
Setup
Below are the main steps I took to implement the above mentioned scenario.
Install Base Operating System
- Installed Windows Server 2008 R2 Enterprise Edition
- Setup all of the network and machine name information (no domain) – turn off TCP Offload
- Updated the drivers on the system to the latest
- Updated the system to the latest
- Setup Hard Drive Configuration
- System Drive (80 gig partition on the 320 Raid Set)
- VM Host Drive(220 gig partition on the 320 Raid Set)
- 4 600 gig partitions for each of the 4 data drives (labeled Storage 1, 2, 3, 4)
- The 2 USB drives will be used as backup drives only
- Added the Hyper V Role to the server (dedicated one of the NIC’s to Hyper V)
- Made other personalized configurations
Drive Letter Size Name Usage c 80 System Host OS Drive d 220 VM VM OS Location e 600 Storage1 VHD Storage Location f 600 Storage2 VHD Storage Location g 600 Storage3 VHD Storage Location h 600 Storage4 VHD Storage Location m 500 USBStorage1 External USB Storage (backup) n 500 USBStorage2 External USB Storage (backup)
Note: Have to say I am pleased to see R2 has a newer interface similar to Win 7. Pretty nice.
Additional: Anti Virus for Windows 2008 R2 was hard to find. I didn’t want to pay hundreds of dollars for a server grade license. I use NOD32 4.0 Personal edition so that didn’t work either. After a while of searching I found ClamWin. This is an open source AV project that does work with 2008 R2. The link is here: ClamWin Free Antivirus
Setup Windows Home Server in a Virtual Machine
Note: During the initial setup the UI response was slow in the VM.
- Launch the Hyper V Management Console
- Create a new virtual machine with the following configuration
- 3072 MB ram
- 100 Gig VHD on the D: drive
- Virtual Processors – 2
- Automatic Start Action – Always start this virtual machine automatically
- Automatic Stop Action – Save the virtual machine state (this should provide for quicker restarts, start ups)
- Install WHS in the VM (from ISO if possible – faster install) – I have a folder on the D drive with OS images in it for any virtual machine I am using. This makes for easier maintenance down the road.
- After about an hour and a quite a few reboots we finally have a desktop
- Turn off TCP Offload for the VM network adapter
- Update time. It appears there are close to a 100 updates (including the 3.5 sp1 framework).
- Install Antivirus. Going with ClamWin here too.
- Shutdown the VM and added (2) 590 gig virtual drives and (2) 500 gig virtual drives to the Virtual Machine (Storing 1 on each of the physical drives listed above (e-h).
- Started VM up and added the 4 drives to the server storage using the Windows Home Server Console
- Once this was completed I was showing 2.2 TB free storage space
- I setup some user accounts and the shared folders (setting the duplication option for critical files
- I copied the original data from external drives back to the server
- I then installed the connector server on my home pc’s.
I have the 2 500 gig USB externals. I am not sure how I am going to implement those at the time of this writing. They will be used for backup – just not sure if it will be connected directly to the VM or to the host system.
** Update
For the external USB drives I added them to the host OS (500 gigs each) and created a 300 gig virtual drive on each one. I set these up in Windows Home Server as drives to backup WHS to. Now I have a backup that backups up the main shares from the main disk array to the USB drives.
I also installed IDrive online backup in WHS via the desktop and have it backing up the main shares (accessible directly through windows explorer) that I need offsite.
All in all I am pleased with the quality and thought put into this product (WHS). It seems very user friendly and most of all – functional.

How to get the path to the Tnsnames.ora file in C#
The following code will return the path to the tnsnames.ora file in C#. This utilizes the system path and returns the first oracle home found in the system path. This is useful since .Net also uses the first home found in the path when calling Oracle. This should work with Oracle versions 9 – 11.
/// <summary>
/// Gets TNSNames file path from system path
/// </summary>
/// <returns>TNSNames.ora file path</returns>
private static string GetPathToTNSNamesFile()
{
string systemPath = Environment.GetEnvironmentVariable(“Path”);
Regex reg = new Regex
(“[a-zA-Z]:\\\\[a-zA-Z0-9\\\\]*(oracle|app)[a-zA-Z0-9_.\\\\]*(?=bin)”);
MatchCollection col = reg.Matches(systemPath);string subpath = “network\\ADMIN\\tnsnames.ora”;
foreach (Match match in col)
{
string path = match.ToString() + subpath;
if (File.Exists(path))
return path;
}
return string.Empty;
}
How do you allocate resources in an agile development environment?
A concept I have been struggling with over the past few months is the allocation of resources in an agile development environment. The problem I have is how do you effectively allocate resources and what ideas should you be focusing on. I see there are two main strategies one could use.
1. Focus resources on specific product areas and leave them in that area
2. Do not focus on a specific product area where anyone can work on any product
I’ll start with the pro’s and cons of each
Focus resources on a specific area
Pros
- Resources grow with the product and usually have a higher level of business knowledge surrounding the product
- Developers tend to know the in’s and out’s of the code thus each task takes less investigative time to perform
- Bugs are easier to identify and fix in a more timely manner
- QA Resources tend to have a better understanding of the product and can perform more in depth testing scenarios
Cons
- Knowledge can become isolated and create product silos
- Losing a single team member may be more costly to the team
- When team members are out (vacation, sick, etc) certain areas may not be able to be worked on / or take longer to implement
- If product management team is weak product may trend in a direction different than other products
Do not focus on a specific product area where anyone can work on any product
Pros
- Losing a team member may be less costly to the product team as a whole
- Resources can be assigned more evenly
- Easier to cover team members being out
Cons
- Product domain knowledge is not built up as quickly by individuals so “experts” are few and far between
- With large products a thorough understanding of the entire product suite is almost impossible to achieve
- The likelihood of people making less than desirable changes to core components can lessen the overall quality of the product
- Developers will be less likely to innovate and improve specific code areas as the “ownership factor” is not present any longer as it would be with a single product or work area
- The “individual” is less likely to stand out
- QA resources are forced to work in too many product areas – thus reducing the effectiveness of strong QA personnel
In a simple world this would be an easy choice. But as I see it we all work in the real world – or at least most of us do. Keep in mind the above does not take into account what practices are implemented during the agile process (SCRUM, TDD, BDD, CI, etc). In a system with more than a million lines of code and many different technologies – how would you expect to ask any developer to perform any function or task? I know there are a lot of great developers who can code in many different languages – but usually people are better in some areas than others. C++ would be an area like this. Would you want a “younger” developer who has never coded C++ messing around with one of your core applications written in C++ or would you rather have an experienced developer who is focused on that area? The same could be said for web development and CSS. Wouldn’t you want to focus your best – most highly trained resources in the areas they excel the best in so you get the most out of your product? How can this be achieved if Option 2 is chosen above? Anybody?
As with any business practice or “religion” there are people who are “purists” for their methodologies. Some of these have practical experience while others are only hypothetical (educational). I will say that I do NOT believe that there is a one size fit’s all methodology for any business practice. There are too many variables for this to be possible. That being said I am open to suggestions above on how this can be achieved as currently I can’t justify option 2 over the loss of quality in a larger product.