The Parallel port driver service failed to start – Hyper-V

imageI migrated Bit Armory's servers from Virtual Server 2005 R2 to Microsoft Windows 2008 R2 Hyper-V and ran into a lot of friction.

Anyway, the migrated servers had annoying errors from the Service Control Manager saying:

Event Type:    Error
Event Source:    Service Control Manager
Event Category:    None
Event ID:    7000
Description:
The Parallel port driver service failed to start due to the following error:
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

image

The problem can easily be solved by disabling the "Parvdm" device & driver service.  Open Device Manager, Check "Show hidden devices", find "Parvdm" in "Non-Plug and Play Drivers".

image image

Then all should be well. Again, just more friction from Microsoft.  They really need to test this stuff. confused0072.gif

Hope that helps,
Brian Chavez

Add Comment Filed Under [ Errors ]
Google Checkout Seller Fees Increasing May 5th 2009

image WTF?  Google's Checkout Merchant fees are increasing May 5th 2009.  This so called new "multi-tier" pricing is the SAME EXACT pricing as PayPal.  WTF?  You can't even CALL Google for Checkout for telephone support!  WTF?!

Quick! Join the Facebook group:

http://www.facebook.com/group.php?gid=57485523675

Merchants Against Google Checkout Fee Hikes!

Let's show the Internets can fight back!

PAYPAL FEES

image

GOOGLE CHECKOUT FEES

image

WTF?!?!

--Brian Chavez

ScriptSharp and 'not using an unsupported feature'

image Well, I was working on killing a bug in JavaScript and I needed Sys.Debug.trace() to help.  I used Script#, and the compiler yelped this error at me:

Check that your C# source compiles and that you are not using an unsupported feature.

Whoops.  Didn't find much around and on good ole' Google, so I didn't have much of an option.  Turns out, I was using namespace-qualified types like so:

   Sys.Debug.Trace( "foo" );

Just change your code to:

    Debug.Trace( "foo" );

And the compiler should be happy again.

Script# is a great tool to add to your tool belt along with MS AJAX and jQuery.  The Script# suite isn't exactly full-feature-tested compiler yet, but it's getting there!  Thanks again Nikhil Kothari!

Hope that helps!

Brian Chavez

Add Comment Filed Under [ Errors ]
NAnt 0.86, script task with RegEx and RegularExpressions

image Muah.  While updating to NAnt 0.86, I was stuck with the following error while trying to execute a <script> task:

The name 'Regex' does not exist in the current context

I was using a <script> task to do some RegEx some files apart of the build process.  Well, turns out that NAnt 0.86-beta2 has a breaking changeSystem.Text.RegularExpressions is now removed by default from the imported assemblies of <script> tasks.  Oh well...

The following should get you back on track:

  641     <script language="C#">

  642           <code>

  643 <![CDATA[

  644         //C# code goes here...

  645   ]]>

  646           </code>

  647         <imports>

  648             <import namespace="System.Text.RegularExpressions"/>

  649         </imports>

  650         <references>

  651             <include name="System.dll"/>

  652         </references>

  653     </script>

Just add the <imports> and <references> section to the <script> task and all should be well again! :)

Brian Chavez

Add Comment Filed Under [ Errors ]
Upgrading SubText, IIS7, Windows 2008

image Bit Armory, Inc. has decided to finally make the move to IIS7 for production.  Let's hope it goes well.

 

First Impressions:

  • Performance seems a little better
  • Better ASP.NET MVC support
  • Easier Setup

I did have a problem with Subtext and IIS 7 yelping back an error:

"System.Web.HttpException: Request is not available in this context"

Thanks to Lance Fisher, the fix was easy, simply set "Classic .NET AppPool" in Manage Web Site > Advanced Settings ... should do the trick.

image

 

Hope that helps!

Brian Chavez

Add Comment Filed Under [ Tips & Tricks Errors ]
Whoa! Google Chrome has crashed

WTF?  ALL my chrome browser windows just now closed...  I thought Google Chrome was immune to crashes.... apparently not.  Guess that "process isolation" feature stuff was pure marketing... fighting0016.gif

image

2 Comments Filed Under [ Errors ]
Obama Palin Dancing With The Stars

LOL.  Just got this in my inbox.  Love the political dance!

Palin Obama Dance

Whoever did this, certainly has some serious l33t Photoshop skillz.

You can find the original here.

Enterprise Library Validation MessageTemplate Tokens

I always forget... pulled from MSDN with my notes added in italics:

Understanding Message Template Tokens

Custom message templates can contain tokens. The validator replaces these tokens with values before it adds the resulting message to an instance of the ValidationResult class. Tokens are represented by using the strings {0}, {1}, {2}, and so on within the message template strings. All validators provided by the Validation Application Block use the first three tokens {0}, {1}, and {2} for the same purposes. Different validators may also understand additional tokens, beginning with {3}. The following table describes tokens {0}, {1}, and {2}.

Token

Description

{0}

This token represents the value of the object that is being validated. Although it can be useful to show the original value as a part of the validation message, you must be careful to avoid injection attacks by escaping any characters that can be used to attack the system that conveys the message to the user.

In simple terms: returns "ObjectBeingValidatedFullTypeName+Field"

{1}

This token represents the key of the object that is being validated. When the validator is attached to a member of a type such as a property or a field, the key is set to the member name. When the validator is attached to an object, the key is null and the token is replaced by an empty string.

In simple terms: returns "Field" name being validated

{2}

This token represents the tag that is specified on the validator instance. If no tag is supplied, the token is replaced by an empty string.

In simple terms: returns contents of [Validator Tag="foo"] property defined in the attribute.

Add Comment Filed Under [ Tips & Tricks C# ]
Fluent C Sharp Language Extension Helpers - Part 1

So, I found myself doing a lot of for( int i = 0; i < n; i++ ){} stuff lately.  So, I've decided to try something new. I've started a small collection of "Fluent Helpers" that alleviate a lot of the verbosity in C#.

About 28 characters (including spaces) for a simple for loop to do some constant iteration.

for( int i = 0; i < n, i++){

About 18 characters to do this (no pun intended):

Do.This( 5, () =>{

Here's an example:

   51             Do.This( 5,

   52                     () =>

   53                         {

   54                             Console.Write( "Hello " );

   55                             Console.WriteLine( "World!" );

   56                         }

   57                 );

Prints:

Hello World!
Hello World!
Hello World!
Hello World!
Hello World!

Now that feels much better on my hands, and looks much cleaner too, IMHO.  Here's the simple implementation for Do.This:

   42     public static class Do

   43     {

   44         public static void This(int times, Action what)

   45         {

   46             for( int i = 0; i < times; i++ )

   47             {

   48                 what();

   49             }

   50         }

   51     }

I've already started a little library of these small syntax helpers I've collected.  If you have any suggestions, please share! cool0003.gif

-Brian Chavez

Add Comment Filed Under [ Tips & Tricks C# ]
NHibernate 2.0 GA released!

Per Fabio's Post, NHibernate 2.0 has been released:

NHibernate 2.0.0.GA is released today
https://sourceforge.net/project/showfiles.php?group_id=73818&package_id=73969
Enjoy it!
We start the work for NH2.0.0SP1
~20 days to:
- support parameters in HQLFunctions
- minors change in tests
- improv for some dialects
- some other minors
And we hope nothing tremendous happen ;)
Bye.
Fabio Maulo
The human knowledge belong to the world

Go grab the download and upgrade today! :)

-Brian Chavez

Add Comment Filed Under [ NHibernate ]