Archive

Author Archive

Pondering my summer vacation

January 15th, 2012 No comments

WPF Named Colors

January 14th, 2012 No comments

I have grown tired of looking up the named colors for my WPF apps.  So I wrote a Helper class to make my life a little easier. 

After playing around with this idea for a couple hours, I found a Dictionary<string,Color> is the easiest and most flexible way to reach my goal. 

Read more…

Yet Another Singleton

January 14th, 2012 No comments

I’ve got an amusing problem at work.  We need to create a way of passing runtime arguments around our app with safe and consistent results.

One solution is create a global class that sits in the core library.  All of the properties would have to be static.  At runtime, the bootstrapper updates the properties then we point everything to the global class when we need to know a value. 

But it smells.  A stinky lit’ hack. 

Read more…

Back

January 12th, 2012 No comments

I’ve been a little busy lately. 

Last week I returned to my “usual” contract in Hillsboro.  This week, I started Calc I and another CS class, a review (for me) of C++.  The Calculus class is going to take real and sustained effort.  The C++ should be a easy.   

At the end of last year, I started spinning up a new company to build motorcycle parts.  Tax Ids, bank account, ordering checks, setting up web servers and acquiring DNSes…  There’s more than a little work to get We got our first round of prototype parts cut last Friday.  A good portion of Saturday was spent fitting the parts an working the bugs out.  We’ll need to update the drawings and get another set of prototypes cut before we get parts cut with the correct materials.  We’ve got about 15 parts in the pipeline.  The idea is to go live at the end of Q1.  We’ll just have to wait and see how things go.  It might work.  It might not. 

To add to the excitement, I’ve been watching Dakar coverage at night.  Watching the bikes blitz across the rocky plains is a sight to behold.  I guess attending a Dakar is working it’s way on to my bucket list.  I have no desire to ride in one.  Those fuckers are truly crazy.  But watching one might be an interesting trip. 

At some point, I should probably sleep…

<???> for President!

November 29th, 2011 No comments

You have to wonder what kind of person would want to be President?

I see only three types of people running for office these days: the egomaniac, the zealot or the bumbling idiot. In each case, you have someone who has is a few waves short of a shipwreck. The scariest type has to be the bumbling idiot. Why? Because you don’t really know who is running the show. Egomaniacs and zealots are obviously listening to the voices inside their own heads or some kind of messianic "voice from above" influence. In any case, it’s not a voice the rest of could hear no matter how many mushrooms were involved. The bumbling idiot only hears silence within and readily listens to the whispers from the ‘trusted advisor.’ Who are these people? Trusted advisors my ass.

Read more…

Tags:

Color me unimpressed AKA InstallShield LE is worthless.

November 21st, 2011 No comments

I brought in a build/install specialist to help with my current project.  My client doesn’t have any fixed installer solution in place.  So we, as a group, decided we would use InstallShield LE to get the ball rolling. 

It’s turned out to be a nightmare.  No one except the build specialist can build the installers.  The pre-reqs built into the installer will not validate or download on to my machine.  On and on…  There are so many crippled features that we can’t create a half-assed installer with any confidence.  And since this is only for our testing team and a trial run for InstallShield, I can’t see spending $600 for a single developer license. 

image

What a joke.  This has been counter-productive and a waste of time/resources/money.  It would have been better if InstallShield offered a full featured trial for a limited number of days as opposed to the uber-crippled LE version.  The end result is I am less interested in recommending their product as a long-term solution.  I think it would be better to use the Setup projects included with Visual Studio and deal with the limitations that we know instead or working around a crippled tool.

Factorials

November 17th, 2011 No comments

First, what’s a factorial?

Paraphrasing Wikipedia: In mathematics, the factorial of a non-negative integer ‘n’, denoted by ‘n!’ is the product of all positive integers less than or equal to the integer.  (link)

Read more…

No mapping between account names and security IDs was done

November 12th, 2011 No comments

Today, I’ve been working with my build team to get setup packages built for our current project.  I have to admit, I’ve never really had to deal with installers before.  I’ve either worked on small packages where I could use a click-once deployment or I’ve been working on really big projects with a dedicated build team.  I’d hand off my code by checking it into source control.  My current project is a bit different because I’m doing the architecture, leading the day-to-day development, and doing all of the hiring/firing bits too AKA management. 

 

Anyway…  One issue we had today was this:

An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: No mapping between account names and security IDs was done

 

The issue is that the serviceProcessInstaller1 (default name) is using a user account during the install. 

Oops.

Here is a quick overview of Service Accounts from the Microsoft site:

Each service executes in the security context of a user account. The user name and password of an account are specified by the CreateService function at the time the service is installed. The user name and password can be changed by using the ChangeServiceConfig function. You can use the QueryServiceConfig function to get the user name (but not the password) associated with a service object. The service control manager (SCM) automatically loads the user profile.

When starting a service, the SCM logs on to the account associated with the service. If the log on is successful, the system produces an access token and attaches it to the new service process. This token identifies the service process in all subsequent interactions with securable objects (objects that have a security descriptor associated with them). For example, if the service tries to open a handle to a pipe, the system compares the service’s access token to the pipe’s security descriptor before granting access.

The SCM does not maintain the passwords of service user accounts. If a password is expired, the logon fails and the service fails to start. The system administrator who assigns accounts to services can create accounts with passwords that never expire. The administrator can also manage accounts with passwords that expire by using a service configuration program to periodically change the passwords.

If a service needs to recognize another service before sharing its information, the second service can either use the same account as the first service, or it can run in an account belonging to an alias that is recognized by the first service. Services that need to run in a distributed manner across the network should run in domain-wide accounts.

 

So?

You need to set the user account to fit your needs.  You can do it through code as discussed above or you can do it inside the ProjectInstaller.cs [Design] screen in Visual Studio. 

Open the design view, then click once on “serviceProcessInstaller1”.   Next right-click and select properties.   

ServiceInstallerAccountUser

There are 4 options for which account you want to use.

ServiceInstallerUserOptions

User (default)

Since the this is the default and the existing setup doesn’t work, this might not be the best option for you. 

Why is this a problem?  This account selection loads the service as the current user which may or may not be what you want.  When you are running/installing the service on your dev machine everything installs as admin, because that’s the context you are running in.  Which is fine.  But when you try to install the service via an install package on a different computer your runtime security context might be different. 

LocalService

From Microsoft

 

The LocalService account is a predefined local account used by the service control manager. This account is not recognized by the security subsystem, so you cannot specify its name in a call to the LookupAccountName function. It has minimum privileges on the local computer and presents anonymous credentials on the network.

 

 

NetworkService

From Microsoft

 

The NetworkService account is a predefined local account used by the service control manager. This account is not recognized by the security subsystem, so you cannot specify its name in a call to the LookupAccountName function. It has minimum privileges on the local computer and acts as the computer on the network.

 

 

LocalSystem

From Microsoft

 

The LocalSystem account is a predefined local account used by the service control manager. This account is not recognized by the security subsystem, so you cannot specify its name in a call to the LookupAccountName function. It has extensive privileges on the local computer, and acts as the computer on the network. Its token includes the NT AUTHORITY\SYSTEM and BUILTIN\Administrators SIDs; these accounts have access to most system objects. The name of the account in all locales is .\LocalSystem. The name, LocalSystem or ComputerName\LocalSystem can also be used. This account does not have a password. If you specify the LocalSystem account in a call to the CreateService or ChangeServiceConfig function, any password information you provide is ignored.

 

 

For my project: we’re moving data between servers with WCF, running an MSMQ service, and reading/writing files from the local file system.  We picked “LocalSystem” for our account.

 

ServiceInstallerAccountLocalSystem

 

Problem solved.

 

References:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms686005(v=VS.85).aspx

Programming != Computer Science

September 13th, 2011 No comments

I saw this article today which lead to this.  All of this got me thinking…

What I haven’t mentioned is that I’m poking around the edges, looking at getting a Master in Computer Science from Portland State University.  Thinking…  Contemplating…  Wondering if I honestly care enough to jump through all of those hoops and get the fucking letters.  (Argh) 

Read more…

Super Ténéré: tricked out and ready to rent/ride

September 13th, 2011 No comments

Three Capes

September 11th, 2011 No comments

Scott and I did the Three Capes loop today.  I took the Super Ténéré.  Scott on his SV1000.

The road between Carlton and Beaver was fairly good. The Three Capes Loop was the usual crap surface.

It was 96 degrees in the valley but only 68 near Netarts.  Temperatures mellowed as we gained altitude crossing the Coastal Range.  I could smell the salt air as we rolled into Beaver.  By the time we got to Pacific City I was chilled.  What did I expect when I pulled on my mesh jacket and perforated boots?  Lunch at the Whiskey Creek restaurant or whatever it’s called at the moment.  Good food.  Quiet place.  The road to Cape Meares is still closed.  Heading inland from Tillamook the temps climbed.  The usual stuff.

I’ve been struggling with a bit of dehydration. My hydration pack helped out quite a bit. Any time I would think about it, I’d try to take 3 or 4 big slugs of water. That helped considerably.

It’s nice to burn some fuel and motor around the country side.    

New Material

September 5th, 2011 No comments

I spent a few hours today adding new pages and filling our some of the existing pages.

I added a travel and etc. sections.  In travel, I posted some pics and provide maps for some of the rides I enjoy.  In etc., I posted everything else from Pets to Prime Numbers and beyond. 

Lots of new photos. 

Lots of new content.

Enjoy

Upgrades to the Super T

August 27th, 2011 No comments

I installed my Fuzeblock Fuse Block FZ-1 and wired in my Bag Connection tank bag today.FZ1

In the beginning… 

Where can I mount my fuse block?  After noodling around for 30 minutes, the best place for me is near the rectifier.  

Read more…