Welcome

You have reached the blog of Keith Elder. Thank you for visiting! Feel free to click the twitter icon to the right and follow me on twitter.

Deep Fried Bytes Episode #22: The Future of .Net Dotfuscator with Gabriel Torok

Posted by Keith Elder | Posted in Podcast | Posted on 19-12-2008

 Listen To This Episode 

http://deepfriedbytes.com/podcast/episode-22-the-future-of-net-dotfuscator-with-gabriel-torok/

 

If you have ever used Visual Studio you may have noticed in the tools menu there is something called Dotfuscator.  This is the tool that allows .Net developers to obfuscate their source code and it has been in Visual Studio since 2003.  In this episode we caught up with Gabriel Torok, President of PreEmptive Solutions, at PDC 2008 and discussed some of the news related to Dotfuscator announced at PDC.

Enjoy.

How To Listen To The Show

1. Directly From The Web Site (or click the link above)

When you visit the site look for this:

Clicking the triangle will launch the Yahoo! media player and automatically start playing the show for you. As long as you leave the browser window open the player will stay open. Clicking off the page WILL stop the player!

2. Subscribe via iTunes and Zune

If you have iTunes or Zune installed on your computer you can subscribe to our show. In iTunes open the Music Store and search for “Deep Fried Bytes”. In the Zune software, go to the MarketPlace select Podcast and search for “Deep Fried Bytes” to subscribe to the show. You can also click either of the two icons below to automatically subscribe to the show if you have iTunes or Zune installed.

Subscribe via iTunes Store Subcribe via Zune Market Place

3. Subscribe to RSS Feed

To stay current and up to date with the show, subscribe to the site’s RSS Feed. If you don’t know about RSS feeds you can read more here: http://en.wikipedia.org/wiki/RSS_(file_format)

If you already have an RSS reader installed and setup, click the feed icon below to grab our news feed.

Subscribe to our podcast!

Deep Fried Bytes Episode #21: Talking Software Performance with Rico Mariani

Posted by Keith Elder | Posted in Podcast | Posted on 06-12-2008

 Listen To This Episode 

http://deepfriedbytes.com/podcast/episode-21-talking-performance-with-performance-preacher-rico-mariani/

 

We have YAPDCT (yet another PDC talk) for everyone.  One of our good friends Jennifer Marsman introduced us to one of the legends at Microsoft, Rico Mariani.  Rico is currently the Chief Architect for Visual Studio.  He’s been involved with performance for years and has some interesting takes on why developers should take performance seriously up front in their design. 

We lobbed Rico an open ended question to kick off the show to get him going and he ran with it from there.  If you write code, no matter the platform, you should listen in.

Enjoy.

How To Listen To The Show

1. Directly From The Web Site (or click the link above)

When you visit the site look for this:

Clicking the triangle will launch the Yahoo! media player and automatically start playing the show for you. As long as you leave the browser window open the player will stay open. Clicking off the page WILL stop the player!

2. Subscribe via iTunes and Zune

If you have iTunes or Zune installed on your computer you can subscribe to our show. In iTunes open the Music Store and search for “Deep Fried Bytes”. In the Zune software, go to the MarketPlace select Podcast and search for “Deep Fried Bytes” to subscribe to the show. You can also click either of the two icons below to automatically subscribe to the show if you have iTunes or Zune installed.

Subscribe via iTunes Store Subcribe via Zune Market Place

3. Subscribe to RSS Feed

To stay current and up to date with the show, subscribe to the site’s RSS Feed. If you don’t know about RSS feeds you can read more here: http://en.wikipedia.org/wiki/RSS_(file_format)

If you already have an RSS reader installed and setup, click the feed icon below to grab our news feed.

Subscribe to our podcast!

2008 Christmas Developer Machine

Posted by Keith Elder | Posted in Computer Hardware, Howtos | Posted on 01-12-2008

Christmas is right around the corner and what better time to start thinking about building a new developer machine.  I’ve been wanting to build a new computer for several months now but I haven’t kept up with the new boards, cases, video cards, etc.  Over the Thanksgiving Holidays I spent a fair amount of time researching and pricing the kind of machine I would build if I built one right now.  Instead of keeping all this hard work to myself I decided to share it.  Who knows, maybe someone out there is looking to upgrade or do a new build.

Here’s what I did.  The first thing I did is throw price completely out the window.  Well, I threw it out up to a point keeping in mind that this is a development machine, not a gaming machine, although they both have the same things in common, SPEED.  I also tried to weigh certain things out, for example, the video card I chose is not the fastest thing on the market, but it is pretty close. 

Case $149 – Coolermaster Cosmos S

imageI like to start with a case when building a new machine.  The case is important on many fronts.  I’ve owned cases that took 15 minutes to get into and I’ve own ones that took 15 seconds.  The case I settled on is the Coolermaster Cosmos S.  Personally I like front I/O panels and this one is nicely concealed.  It is also pleasing to the eyes and has 7 bays.  This makes it easy to support hard drive coolers and plenty of drives for RAID 0, 1, 5 or 10 configurations.  I had a full tower years ago that had 5 and I had it completely full.  Thus 7 is very welcomed.

Motherboard $299 – EVGA X58 3X SLI

imageThe most important thing in building a new machine is the motherboard.  Researching this machine I spent probably 4-6 hours just on this one part.  I read more reviews and forums than I care to mention. 

For years I have been an Asus motherboard fan.  But I have kept my eyes on EVGA for awhile.  They are renowned for their support and support of over clockers.  The EVGA X58 3X SLI motherboard was just released a few weeks ago and it is the board right now to own.  Some features are it supports the new X58 Intel chipset which supports the new Core I7 Intel processors.  This board also supports 3 SLI video cards as well as 12GB of memory.  On a lot of other boards, the highest you can go is 8GB, but the new chipset expands this with 6 DDR3 slots which support 2GB each.  This means that you will either have 6GB or 12GB in the machine as you buy the memory in a sets of three. 

CPU $1029 – Intel Core I7 965 Extreme Edition

image Intel’s new Core i7 965 Extreme Edition is crazy fast and not only that, it can be over clocked to 4.2GHz reliably with the EVGA X58 motherboard.  Just be sure to invest in a water cooled unit.

This processor has 4 cores and is capable of running 8 threads at a frequency of 3.2GHz as well as supports the new bus interface called QuickPath.  Windows will report your machine having 8 processors in it since it can support 8 threads. 

To give you an idea of what this new processor is capable of, the current Core 2 Extreme QX9770’s scored a 3D benchmark of 4,922.  The i7 965 Extreme Edition clocks in at 5,716.  And the other kicker is the price for the QX9770 is $1399.  Enough said.

2 Video Cards @ $259 / each – EVGA GTX 260 Superclocked Edition 896MB

imageFor the video card I settled on the EVGA GTX 260 Superclock Edition.  As I mentioned earlier, it is not the newest board out.  But honestly, the difference in price doesn’t justify purchasing the GTX280.  Of course to support SLI we need two of these, however, for a developer rig, one could get buy with just one, unless you wanted to support more monitors.

The other reason I settled on this card is EVGA has a current special on this card and the X58 3X SLI board.  This is not easy to find and I stumbled upon it.  The deal is you buy the board and 2 GTX 260 cards you get an instant $70 rebate (more if you buy three).  Even comparing prices on NewEgg, this deal still worked out to be cheaper.  Here is the link to the deal:  http://www.evga.com/articles/00443/ 

Power Supply $339 – Thermaltake ToughPower 1,200 Watts – Quad SLI Ready

image

To support the higher processors, multiple video cards, multiple hard drives, DVD, etc, more power is needed.  A power supply is something one absolutely cannot skip out on.

I settled on the Thermaltake ToughPower 1,200 Watts power supply.  Thermaltake uses industrial grade components and is used by high-end OEM’s.  You really can’t go wrong with this one since it supports Quad SLI, Crossfire and more.

2 Memory @ $249 / each – Patriot Viper 6GB DDR3 1600 (12GB)

image

To get true performance I wanted to go with 1600 memory and the EVGA X58 3X SLI board supports it.  Patriot Viper is a highly regarded and the price isn’t bad either.  Since the motherboard supports 12GB, that’s 12GB of memory for $500!  Not bad.

DVD $94.99 – LG Blu-ray / HDDVD / DVD GGC-H20LK

image

Blu-ray drives have come down tremendously.  LG is known for making great products and since I really don’t use this device except to load software I’m not looking to spend a fortune.  This model supports Blu-ray, HD DVD and is a DVD RW. 

Sound $0 – On Motherboard

Conserving money I decided to use the built-in sound on the motherboard.  I would probably opt for the Creative X-FI Elite Pro or something higher end only because I work with audio so much for our podcast.  The onboard audio for the motherboard is perfectly fine.  Thus, $0.

2 HDD @ $229 / each – Western Digital 300GB Raptor 10,000 RPM

The Western Digital Raptor hard drive clocks in at 10,000 RPM.  The slowest part of a computer is the I/O and having 10,000 RPM drives definitely helps.   The only thing I haven’t decided is if I would put these in a RAID 0 configuration or just use them as two separate drives.  As a developer I run a lot of virtual machines and need to have virtual machines run on separate drives.  RAID 0 would be the fastest option but not for VM’s if there is only one drive.    There are still plenty of options for storage and I haven’t completely settled on what I’d do at this point.   All I do know is these drives will be in the mix somehow. 

Total

$3416.97

That includes 2 video cards, 2 300GB drives, 12GB of memory

What’s missing?  Obviously I didn’t list a liquid cooling system, I’m still shopping around for options.  I would also probably include a couple of HDD coolers.  Those drives spinning at 10,000 RPM are going to generate heat, best to keep them cooled.  I like the Vigor iSURF II’s if you are in the market. 

Like I said, I spent a lot of time figuring out what I’d build starting from scratch today.  Hopefully someone else out there will find this useful.  And of course, if you have any recommendations I’d love to hear them.  I don’t know when I’ll start to build this machine, certainly not this year, but at least this gives me an idea now for cost. 

Workaround For WCF NetMsmqBinding Bug: The service ‘~/queue’ does not exist.

Posted by Keith Elder | Posted in .Net, WCF | Posted on 24-11-2008

There is an extremely nasty bug in WCF (Windows Communication Foundation) that I have discovered as of late.  I know it is a bug because after several weeks with an open support call into Microsoft it was confirmed as a bug.  It was so perplexing because it was hard to replicate.  It even took the .Net Framework developers a week or more to track it down.  Here’s a full blown error message:

An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/2/ROOT

Process ID: 4428

Exception: System.ServiceModel.EndpointNotFoundException

Message: The service ‘~/unittestqueue’ does not exist.

StackTrace:    at System.ServiceModel.ServiceHostingEnvironment.NormalizeVirtualPath(String virtualPath)
   at System.ServiceModel.Channels.MsmqHostedTransportManager.HostedBindingFilter.MatchFound(String host, String name, Boolean isPrivate)
   at System.ServiceModel.Channels.MsmqBindingMonitor.MatchQueue(MatchState state)
   at System.ServiceModel.Channels.MsmqBindingMonitor.ProcessFoundQueues(MessageQueue[] queues, Dictionary`2 knownQueues, Boolean isPrivate)
   at System.ServiceModel.Channels.MsmqBindingMonitor.OnTimer(Object state)
   at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2()
   at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.OnSecurityContextCallback(Object o)
   at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
   at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke()
   at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks()
   at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state)
   at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
   at System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

 

Ok, you see the error message above where it says the service ‘~unittestqueue` does not exist?  Well that queue DOES exist on the server but there isn’t a service mapped to that queue. 

The kicker to this is that I’m not even using the unittestqueue at all within my code.  This begs the question, why is a queue that I’m not even using showing up in my error list?  The netMsmqBinding I had configured used another queue called logEntries.  Here is the WCF configuration so you can see how this is configured.

   1: <system.serviceModel>
   2:         <serviceHostingEnvironment>
   3:             <baseAddressPrefixFilters>
   4:                 <add prefix="http://keithelder.net/"/>
   5:             </baseAddressPrefixFilters>
   6:         </serviceHostingEnvironment>
   7:         <client/>
   8:         <bindings>
   9:             <netMsmqBinding>
  10:                 <binding name="msmqBinding">
  11:                     <security mode="None">
  12:                         <transport msmqAuthenticationMode="None" msmqProtectionLevel="None"/>
  13:                         <message clientCredentialType="None"/>
  14:                     </security>
  15:                 </binding>
  16:             </netMsmqBinding>
  17:         </bindings>
  18:         <services>
  19:    <service behaviorConfiguration="LogEntriesBehavior"
  20:     name="KeithElder.MsmqService">
  21:     <endpoint address="net.msmq://keithelder.net/private/LogEntries"
  22:      binding="netMsmqBinding" bindingConfiguration="msmqBinding" name="msmq"
  23:      contract="KeithElder.ILogMsmqService" />
  24:     <endpoint binding="mexHttpBinding" bindingConfiguration="" name="wsdl"
  25:      contract="IMetadataExchange" />
  26:    </service>
  27:   </services>
  28:         <behaviors>
  29:             <serviceBehaviors>
  30:                 <behavior name="LogEntriesBehavior">
  31:                     <serviceMetadata httpGetEnabled="true"/>
  32:                     <serviceDebug includeExceptionDetailInFaults="false"/>
  33:                     <serviceThrottling/>
  34:                 </behavior>
  35:             </serviceBehaviors>
  36:         </behaviors>
  37:     </system.serviceModel>

The endpint is set to net.msmq://keithelder.net/private/LogEntries.  This means that messages received on this endpoint will be stored in the private queue logEntries.  Once stored, the messages call the method written in WCF to take the message from the queue and process it.  Really, this is all slick when it works and opens the door for a lot of scenarios. 

Obviously we aren’t supposed to be getting this error, especially about a queue WE AREN”T EVEN USING!

By the way, when this error occurs, it kicks off the jitdebugger and will slow your machine to a crawl.  It isn’t something fun to debug, trust me.

The Fix

If you have run into this error, and find this entry on my blog somehow, here is the workaround for this.  Again, this is a workaround, not optimal by any means.  There are two things you have to do (at least as far as I can tell with my testing).

Fix #1

Do not have any additional private queues other than the queue required for your service.  Obviously this has problems because other applications may be writing to private queues as well. 

Fix #2

Deploy the application to a virtual directory in IIS.  This is where I first started noticing the problem because I couldn’t get our test server to work when I deployed the code even though it worked on my machine. 

Fix #3 (added 12/3/2008)

Support from Microsoft said you can do one or the other, but I am still getting errors in the event log even though the application is deployed in a virtual directory with two private queues.  If I delete all queues and have it deployed in a virtual directory things are happy.  Changing the endpoint to the name of the path of the service does fix the problem and allows multiple queues to be on the machine.  I’ve tested this extensively.  Here’s an example:

image

So instead of having the queue named “LogEntries”, changing it to “myvirtualapp/service.svc” fixed the problem and things work normally.

Official Fix

I was told by Microsoft Support this bug would be fixed in the next service pack and also the .Net Framework 4.0. 

IIS7 – Service Unavailable Error App Pool Permissions

Posted by Keith Elder | Posted in Windows | Posted on 24-11-2008

I just spent two hours trying to figure out why I couldn’t deploy a Windows Communications Service to my local IIS setup.  I kept getting the famous error:

503 – Service Unavailable

This error is about as helpful as a toothpick in a snow storm.

It turned out my problem was simple to solve, I just wasn’t paying attention. 

I had an application pool setup with my domain credentials so the service could run under my username and access the resources it needed to.  The problem was it had been so long since I  had worked on the application, my password for my domain account had expired.  Thus the application pool wouldn’t start.  I changed the password and things are working now. 

Hopefully this will help someone out there not waste a few hours of work.  I’m off to kick myself for not catching this earlier.