Monday, June 8, 2009

Microsoft Certification

I finally started the process to become Microsoft Certified.  I scanned through the available certifications and decided to start with MCTS: .NET Framework 3.5, ASP.NET Applications.  This certification requires two exams: 70-536 and 70-562.  I scheduled Exam 70-536 for June 20th and have done a lot of reading.  I’m hoping to finish the MCTS Self-Paced Training Kit in the next couple of days and then take many of the practice tests to review what I’ve learned.

My Network Printer Setup: Part 2

In Part 1, I went through the steps for setting up the Common UNIX Printing System (CUPS).  Now I need to setup SAMBA so the Windows PCs on my network can see and use the printer.

First, backup the smb.conf file and make it read only:
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.original
sudo chmod a-w /etc/samba/smb.conf.original

In the “########## Printing ##########” section, uncomment the lines for the CUPS printing:
printing = cups
printcap name = cups

In the “[printers]” section change “guest ok” to “yes” and add “use client driver = yes”.  Save and close the config file.

That should be all the changes necessary to the server in order to add the printer to the Windows XP PCs.

There are two more steps in order to get the printer working on each Windows XP client:

  1. Add the “Print Services for Unix” Windows component (through Add/Remove Programs –> Add/Remove Windows Components –> Other Network File and Print Services).
  2. Using the Add Printer wizard, I browsed for a printer and found the one attached to my server.  I set it as my default.

After picking the correct drivers, I tried printing a test page, and it worked.

My Network Printer Setup: Part 1

My desk is too small for both my monitors and a printer so I decided to move my printer to an extra PC I have that is running the server version of Ubuntu 9.04.  After moving the printer, I need to setup the Common UNIX Printing System (CUPS) and SAMBA in order to use it from other PCs on my network.  This post will highlight the steps that I took to setup CUPS.

First, after logging into the server I installed CUPS:
sudo apt-get install cupsys cupsys-client

Then, make a copy of the CUPS config file and make it read only:
sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.original
sudo chmod a-w /etc/cups/cupsd.conf.original

Now open the config file to edit:
sudo vim /etc/cups/cupsd.conf

In the “Listen” section add:  Listen ###.###.###.###:631
(Replace the # signs with the LAN IP address of the server)

And change the “<Location />” section to:
Order deny,allow
Deny From All
Allow From ###.###.###.*
(Replacing the # signs with the first three octets of the client computer IP address)

You also need to update the <Location /admin> section to allow the IP address of the PC you wish to allow to setup/add printers.

After making those changes, save and close the config file.

Restart CUPS:
sudo /etc/init.d/cups restart

You should now be able to access the web interface of CUPS using http://###.###.###.###:631/ (again replacing the # signs with the LAN IP address of the server).

To Add a new printer, click the Administration tab and “Find New Printers”.  It will show any locally connected printers.  “Add this printer”, fill in the info, and click Continue.  Pick the Model/Driver for the printer [I used “HP PSC 500 Foomatic/pcl3 (en)” for mine] or provide a PPD file.  Then click “Add Printer”.  Enter the username and password you log onto the server with and it should be added successfully.

You will have the option to setup a few settings, I left mine as the defaults.

Now, I can print a test page from the web interface, but I need to install SAMBA and do more configuration to be able to print from other computers on my network.

Saturday, May 3, 2008

Another Live Writer Plugin

I had an idea for another Windows Live Writer Plugin, and since my KickIt! plugin was somewhat working I started a new one that will insert album information from Amazon.  It'll give readers a chance to quickly get to and buy the album or even the non-DRM MP3 version of the tracks.

Here is the album I was listening to while writing this plugin:

The Way of the Fist Image

Five Finger Death Punch

The Way of the Fist

I'll post more information and some of the code when I fix a few issues with the current version.

Submit this story to DotNetKicks

Thursday, May 1, 2008

SpreadTheWord Plugin

I decided that the easy way that I was allowing someone to submit one of my posts to wasn't the best way for my blog.  Since I write posts that aren't .NET related, why should there be an easy way to submit them?  I wanted to solve this by writing a Windows Live Writer plugin.

First, I created a Windows Class Library and added a reference to the WindowsLive.Writer.Api.dll found in Live Writer's Program Files directory (which for build 12.0.1370.325 is "C:\Program Files\Windows Live\Writer"). I also added a post build event to copy my DLL to the plugins directory ("C:\Program Files\Windows Live\Writer\Plugins") at the end of a build (NOTE: If Windows Live Writer is open, the build will fail).

I'm not going to give a lot of detail of the way a Live Writer plugin is written (why rehash what Keyvan Nayyeri already wrote at

I also decided to have my plugin use WPF for accepting input.  Since, I haven't figured out how to get the URL & Title for a post, the person blogging has to enter these.  This definitely isn't the ideal solution, but I wanted to get something working.

What I have so far isn't all that great, but it's working well enough for me to put the KickIt! button at the bottom of this post.

Submit this story to DotNetKicks

iisreset error

When I started my new job I ran into an issue with running iisreset on Windows XP SP2. If I tried to run iisreset I would get a message saying "class not registered". I was able to get it fixed after searching for a while. This was a few months ago, and today a coworker ran into the same error. It took me a while to find the solution again but this is how we fixed it:

Run each of the following in a command window:
1. regsvr32 c:\windows\system32\atl.dll
2. regsvr32 c:\windows\system32\inetsrv\appconf.dll
3. c:\windows\system32\inetsrv\iisrstas /RegServer

Wednesday, April 9, 2008 & Blogger Integration

I found this "digg" like site today, called DotNetKicks. It has the same concept as digg, just only .NET related content. Plus you can make money submitting stories!

After I found the site I looked for an easy way to submit any of my blog articles to DotNetKicks. Found a couple of urls (this and this. Well, I used the info in their posts and added the image to "kick it" to all my posts (using Jason's template idea).

UPDATE: I removed the "kick it" image from all my posts. I am working on Windows Live Writer plugin that will let put the image on only the posts that I want it on.