Archive

Archive for December, 2009

How to test Windows Authentication with Applications and VMware Workstation

December 16, 2009 2 comments

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:

  1. Join the VM to a corporate domain (good luck getting this past your IT Department)
  2. Setup a VPN tunnel from the VPN to the domain (again – good luck with IT)
  3. 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

 image

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.

  1. Create a virtual machine
  2. Add a second NIC to the machine set to Host Only
  3. Install the operating system and patch
  4. 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
  5. 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

December 7, 2009 Leave a comment

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.

image

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.

image

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.

image

You can download the time from here Timer.zip

Categories: C#, Tools, WPF Tags: , ,
Follow

Get every new post delivered to your Inbox.