<CharlieDigital/> Programming, Politics, and uhh…pineapples


SharePoint SoapServerException When Using Lists Service

Posted by Charles Chen

When using the lists service to query the "User Information List" (the SharePoint list where the users and groups is located), you may encounter the exception:

    Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException'
    was thrown.
  at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(
      SoapClientMessage message,
      WebResponse response,
      Stream responseStream,
      Boolean asyncCall)
  at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(
      String methodName,
      Object[] parameters)
  at ListsDataServiceSample.SharePoint.Lists.Lists.GetList(String listName) in
          Web References\SharePoint.Lists\Reference.cs:line 213
  at ListsDataServiceSample.Program.Run() in
          Program.cs:line 28

This error will occur if you are not using the "Administrator" account, which of course, is not always ideal, especially if you are writing a client side app.

The solution to fix this is to grant the account permissions on the "User Information List":

And then give the user "Read" permissions on the list:

Filed under: .Net, SharePoint No Comments

Correlation Across Workflow Instances

Posted by Charles Chen

One of the problems that I've been working on solving recently centered around correlation in workflows.  In simple terms, where a workflow may produce parallel execution paths, correlation allows the runtime to route events to the right workflow execution path.

In every example that I came across on MSDN and online, the sample cases all assumed intra-workflow correlation as opposed to inter-workflow correlation involving "parent-child" workflow instances.

I posted the initial query - and the solution I used - on this subject over at the MSDN forums:

The trick, as it turns out, is that the CorrelationToken must be initialized in the parent workflow.  To accomplish this in the sample, I made a frivolous call to an InitializeCorrelation method on my service interface using a CallExternalMethodActivity, which was marked with the CorrelationInitializer attribute.  This activity executes right before the InvokeWorkflowActivity.

public class WorkflowCommunicationServiceArgs : ExternalDataEventArgs {
private string key;

public string Key {
get { return key; }
set { key = value; }

public WorkflowCommunicationServiceArgs(Guid instanceId, string key)
base(instanceId) {
this.key = key;

public interface IWorkflowCommunicationService {
[CorrelationAlias("key", "e.Key")]
event EventHandler<WorkflowCommunicationServiceArgs> ChildCompleted;

void InitializeCorrelation(string key);

void OnChildCompleted(string key);

public class WorkflowCommunicationService : IWorkflowCommunicationService {
#region IWorkflowCommunicationService Members

public event EventHandler<WorkflowCommunicationServiceArgs> ChildCompleted;

public void InitializeCorrelation(string key) {
Console.Out.WriteLine("Key -> [{0}]", key);

public void OnChildCompleted(string key) {
MessageBox.Show(string.Format("Completed child; Key = [{0}]", key));


public void RaiseChildCompletedEvent(string key) {
if (ChildCompleted != null) {
new WorkflowCommunicationServiceArgs(



In essence, the idea is to have two correlation initializers: one utilized by the parent/outer workflow and one utilized by the child/inner workflow when signaling back to the parent.  It seems kind of counterintuitive to require two initializations...I'm still not sure how this is working under the covers, but it works 🙂

The working example can be downloaded from: http://www.charliedigital.com/junk/CorrelationTest.Working.zip

Filed under: .Net, WF No Comments

5 Lessons For Barbeque’n

Posted by Charles Chen

  1. Cut veggies into large sizes.  This makes it easier to work with them and not have them fall through the grate.

  2. Put small items onto skewers.  Items like shrimp just won't work on the grill without a skewer.

  3. If you're making chicken or other meats low in fat, brush the grilling surface with some oil first.

  4. Make bigger fires.  Charcoal is surprisingly difficult to light without lighter fluid.  Do it right the first time and make a big-ass fire.  Put some newspaper under the coals.

  5. Enjoy yourself!


25 Up

Posted by Charles Chen

I just finished watching the documentary 49 Up.

There's something quite moving in watching people mature from 7 to 49 in a matter of minutes and to see the change in their ideals, dreams, and their lives.  It was fascinating watching these individuals age and see how their lives took shape.

It's equally fascinating as you start to reflect on where you've been and where you shall be in  more years.

If there's one thing I've taken from the movie, is the importance of being happy in your circumstances and making the best of your lot in life.  Dreams come and go, as do opportunities.  Mistakes are made and there trying times are a certainty, but in the end, it's important to realize the brevity of your existence.  It is easy to blame circumstance and others for one's misfortune and hardships, but ultimately, the life is your own and you must do with it what you will.

The Dalai Lama writes in The Meaning of Life:

Shantideva reasons that if something can be done to fix a situation, there is no need to worry.  Whereas on the other hand, if there is nothing that can be done, there is no use in worrying.

If there is one person in the series that embodied this the most, I think it would have to be Neil, who, for a good part of his adult life, seemed to wander aimlessly.

Neil turned out to be one of the most interesting of the entire group. At seven he was funny, full of life and hope. At 14 he was doing well in comprehensive school but was more serious and subdued. In one of the biggest shocks of the series however, by the time of 21 Up he was homeless in London, having dropped out of Aberdeen University after one term, and was living in a squat and finding work as he could on building sites.

At 35 amazingly, he had turned his life around to a great degree and found his calling in politics.

For some of the kids, like Andrew, life turned out exaclty as scripted (either by themselves or by their parents).  For others, it is a meandering journey where childhood dreams are often crushed by the realities of the world.  The key, I think, is to be able to accept these defeats, take a lesson from them, and to see the opportunities ahead instead of the failures in the past.

The thread that struck me the most about the lives of each of the individuals in the documentary is the common importance of family and how it is a driving force in finding that peace.  Of the subjects, only Neil did not marry or have children; at 49, this lack of a family of his own and the troubled relationship with his parents, was perhaps one of his own greatest regrets in his life.

In reflecting on my own thoughts on this subject, I find that today, I'm much less enthused about the idea of being a father then I was when I was a teenager.  Not because I don't like kids or that I don't want the experience of being a father - one day - but it just feels like I'm still a bit too selfish to my own needs to be a father.  I like living my life on my schedule.

49 Up is an excellent documentary that I think all young adults should watch and study.  I think it reveals a lot about how fleeting one's perception of the world is and how it evolves over time.  It gives insight into what it really means to find happiness and to find purpose in life.


Palm Readings Vindicated (Sorta, Kinda)!

Posted by Charles Chen

Came across an interesting article on Yahoo today on how finger lengths/ratio can be used to predict SAT performance.


Kids with longer ring fingers compared to index fingers are likely to have higher math scores than literacy or verbal scores on the college entrance exam, while children with the reverse finger-length ratio are likely to have higher reading and writing, or verbal, scores versus math scores.

To me, what's interesting is that palm reading - or chiromancy - is centuries old and has been derided as being nothing more than a pseudoscience or even worse, a sham. So it's interesting to discover that perhaps there is some legitimacy to chiromancy after all.

Indeed, in my case, my ring finger is longer than my index finger - which indicates that I'd be more proficient at demonstrating spatial and mathematical skills - reflects the 100 point differential in my SAT verbal and math scores in favor of math.

The article goes on to mention that:

Exposure to testosterone in the womb is said to promote development of areas of the brain often associated with spatial and mathematical skills, he said. That hormone makes the ring finger longer. Estrogen exposure does the same for areas of the brain associated with verbal ability and tends to lengthen the index finger relative to the ring finger.

This makes me wonder what other parts of our personalities, skills, and abilities are manifested in our appearances and physical attributes.

Very interesting indeed.


Blizzard Announces Starcraft 2!!!

Posted by Charles Chen


3:07 - Showing gameplay footage - Looks like protoss ships - floating over asteroid/ base structure - entering protoss ase - similar looking buildings - vespene gas still in the game - character pane shows up on right side - some protoss guy - shifts to terran bases floating on rockets over same type of territory - sill collecting crystals as resources - marines load out. Dustin is actually playing the game - nothing in the game is final.

3:05 - Morheim says everyone eager to see actual game - going to show actual gameplay - bringing up SC2 lead designer. Dustin Browder.

3:00 - FMV sequence in a spaceship - looks Terran - zooming in on a metal door - door opening - reveals a guy with a cigar in chains - prisoner - door shuts behind him - there's so much bass the room is shaking - guy steps into some kind of metallic devicce - legs are strapped in - guy rising toward ceiling - Korean text on screen got people very excited - another part of the machine is dropping metal arms on him - machine whirring - applying armor to his torso - extremly detailed visuals here - now guy is strapping on gloves - armor is molding together - seems like a Terran marine - rockets turn on - zerg now onscreen - Marine delivers a line - StarCraft 2 officially announced.

2:57 - Showing another movie, presumably of game footage.

2:56 - Video over - Morhaime about to make announcement.

All I can say is: FINALLY!!

Filed under: Awesome No Comments

Recycling Styrofoam

Posted by Charles Chen

I came across an interesting white paper from Sony on recycling styrofoam.

Additionally, and this is an important point, the evaporated limonene is returned to a clean liquid state and can be reused any number of times. This system can be said
to be a thoroughgoing recycling system which generates no waste.

Not only is the process use fully recyclable (and natural (linoene being extracted from the peels of oranges)) raw materials, it also does not degrade the chemical qualities of the original substance:

Since thermal processing is known to degrade the properties of some materials, one might wonder if this heating is safe. However, oxidation and breakdown of the polystyrene is suppressed since limonene oxidizes before polystyrene.

In addition, from a carbon output perspective:

Overall, the limonene method has CO2 emissions of about 0.6 kg of CO2 per 1 kg of styrofoam recovered. This is the smallest of all the methods, and about 1/3 the emissions associated with new polystyrene synthesis.

I hope we see this process becoming more widespread in the future.

Filed under: Awesome No Comments

Office Add-In Development “Gotcha”

Posted by Charles Chen

Because of the nature of how Office add-ins are loaded, it's an easy enough mistake to try to name your configuration file as:

<library-name-with-extension>.config or in my case, <executable-name-with-extension>.config.

In fact, the configuration file actually needs to be named WINWORD.exe.config and it should be located in the same location as the as the Word runtime.  It's kinda of baffling though, since as far as I understand, Word is not a native .Net application. 

Of course, I didn't notice this since the application was designed to run as a standalone executable and as an add-in, so the configuration file worked fine when launched as a standalone, but not so well when launched as an add-in.

Filed under: .Net No Comments

Cool Stuff

Posted by Charles Chen

Just some random stuff for today:

I came across an interview on CNN.com with Scott Adams that is a good read. Especially insightful is:

I start at 5 usually, 5 in the morning. I just walk across the street in my flip-flops and pet my cat for 10 minutes so she won't bother me for the next few hours. There's kind of a toll you have to pay with a cat; if you don't pet her for 10 minutes she'll bother you for six hours.

Truer words of wisdom have never been spoken.

I also came across an awesome little tidbit on MSNBC the other day:

In a whale-sized project, the world's scientists plan to compile everything they know about all of Earth's 1.8 million known species and put it all on one Web site, open to everyone.

Sounds completely awesome...I could totally see myself spending endless hours just browsing through it.


How Important Is A Candidate’s Belief In Evolution?

Posted by Charles Chen

It has been raised in various discussions on the topic of the 2008 presidential elections: just how important is a candidate's belief in the theory of evolution? Should the people even care?

I say yes.

It shows that one has a respect for the sciences and scientists. It shows that one has an understanding of the scientific method and how a large majority of respected scientists have arrived at the conclusion that evolution is an established and accepted scientific theory. It shows that one can objectively evaluate the data and evidence that has been produced that show evolution to be undeniable.

This is the information age. We are in an era defined by the technological and scientific advancements that have been made over the last century. Antibiotics, the personal automobile, nuclear energy, peering into the depths of space via the Hubble telescope, the Internet...all of these discoveries, inventions, and conveniences are the direct result of science, not faith. Religious faith would have one believe that prayer alone will overcome a serious infection. Religious faith would have had us believe that the Earth is the center of the universe. Religious faith would have had us believe that the Earth is flat. Religious faith would have us believe that "because that's how God designed it" is an acceptable answer to anything we do not yet understand. Faith is a cop-out of an answer.

When our scientists and engineers are shunned (e.g. re:stem cell research), when peer reviewed results are discarded or deemed irrelevant (e.g. evidence of human driven global warming), when generally accepted scientific theories are questioned (e.g. evolution), then you know that the leadership of this country has failed to put a premium on knowledge and grant respect to those in our society who seek to enrich the collective knowledge of the Humankind.

If one cannot fathom evolution, even given the consensus of the world's leading scientists, If one cannot accept evolution, even given the large amount of evidence (on a micro and macro level), if one cannot objectively make a decision based on unbiased data without the interference of personal faith/beliefs, then such a person is not of the mental capacity and certainly not of sound judgement to lead the United States of America.

You know, I found it quite humorous to hear these candidates babble on about the manufacturing sector and how we simply cannot compete with China, Mexico, and other countries where low cost labor is abundant.

I ask, why the **** would we even want to compete with them on such a level? The promise of the future lies not in manufacturing, but in knowledge, information, and the ability to innovate. These are all things that Americans excel at. These are things that science excels at. We should be glad to have this opportunity to continue our transition from an industrial economy to a knowledge and service driven economy.

Instead, the leadership has taken us backwards.

As energy costs soar in the next century due to increases in demand and decreases in the raw resources, alternative energy sources will be the only option. Instead of embracing this ideal, the US is letting the opportunity to innovate and lead slip away.

Instead of embracing the promise of stem cell research, our leadership views such science with disdain because of the uneducated masses that support them. Instead of taking a leadership position in this vital field, we force some of our brightest scientists in this field overseas to countries like China, Singapore, Japan, and various European nations where such pursuits are embraced because of the financial and medical promises of such research.

As we move forward, it will be the global alliances and friendships that we form that will help drive our markets and help drive demand for our knowledge and unique capability to innovate. And yet, instead of reaching out to allies and trying to mend torn relationships, instead of diplomatic solutions and dicussion, instead of dialogue and sound governance, we seek to take a bully like stand on the global stage with strong talk like a young child throwing a temper tantrum (or an e-thug).

To drive us towards a better, more prosperous future, we need leadership that will respect science. We need leadership that will respect dialogue. We need leadership that will look at subjects and look at the data objectively and not let personal faith muddy the waters of clear and sound judgement. It is innovation in the sciences and engineering that has made America the country that it is today. It is innovation in these areas that hold the greatest potential to drive us forward tomorrow and we need leaders that understand the importance of leading a global economy driven by information, technology, innovation, and science.