OneNote Word Count

21. September 2009

A tool I use everyday and one of my favorites is OneNote. If you have never used it you should really give it a try.

Today I needed a word count on one of my pages. Microsoft Word is great about listing the word count in the lower left hand corner but OneNote natively doesn't have anything like that. I know I could copy and paste it into Word to get the count but that is pretty lame.
Just when I think I have found something missing, the OneNote team has taken care of in the form of a powertoy.

1. You need to have the .Net 2.0 Framework installed
2. Download the application from here: OneNote2007WordCount.zip
3. Run setup
4. Close and restart OneNote

You will now see a new button in OneNote

Word Count

 

When You click the button you will now get a popup giving you the metrics of the page.

Word Count

 


Thanks OneNote Team!

Tech

Cert errors with MS Deploy

12. September 2009

Web Deployment Tool (MS Deploy) is a great tool the IIS team has created to make it easier to manage, deploy, and migrate your web servers.
This can be done at a granular level where you are moving just an application or website, or you can even use it to replicate or sync multiple servers.

One issue I recently ran into that had me stumped had to do with syncing website certificates across multiple servers. Some servers or certificates would work but others were giving the error:
Error:  Object of type 'cert' and path 'my\31fb711de260d2a' cannot be created
Error:  No certificate found in store my with hash '31fb711de260d2a'
Error:  Key not valid for use in specified state.
 
Error count: 1

I will walk you through the steps to get this error and why we were getting it. On the server you want to pull the certificate from you first run “netsh http show ssl” and get what is referred to as the hash. This will be needed when you run msdeploy to export the certificate.

Netsh command

 

The command I was using to copy one certificate to another machine is below. More information about the certificate provider can be found here.

 
msdeploy.exe -verb:sync -source:cert=(MY\31fb711de260d2a),computername=SourceServer -dest:cert=(MY\31fb711de260d2a),computername=DestinationServer

MS Deploy Certificate error


If you see these errors it can be one of a few issues. The most common one would be spelling the DestinationServer correctly and making sure you can connect to it. For us the issue was that when the SSL Certificate was installed the option "Mark this key as exportable" was not selected. Once I reinstalled the certificate with the "Mark this key as exportable" option everything worked without error.

MSDeploy, Tech , , ,