How to use makecert.exe to create a self-signed test certificate that can be used with .NET

September 6, 2011 at 9:50 AMalex

Problem: Special options must be specified with makecert.exe, to create a self-signed certificate that can be used with .NET.

Solution: The following command can be used to create and import a self-signed SSL test certificate: makecert -r -pe -n "" -b 01/01/2000 -e 01/01/2036 -eku -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12

Posted in: Development


US Solar Export

August 29, 2011 at 11:16 PMalex

It turned out that US is one of the largest producer and consumer of US solar panels made world-wide according to the report. Although, it claims that largest portion of costs associated with it is installation, I would say that according to my analysis, their cost itself is still pretty high and ROI is 15-20 years.

Posted in: R&D



August 16, 2011 at 1:10 AMalex

A very good explanation of the coarsening phenomenon can be found here.

Posted in: R&D


Interesting talks on LIDNUG

August 10, 2011 at 11:07 AMalex

--Events August-----------------------------------------------
Getting started with Thread Synchronization by Jeffrey Ricther
Aug 15, 2011 - 10AM PT

Azure for Developers by Robin Shahan (MVP)
Aug 26 2011 - 10AM PT

What's new in Windows Phone 7.1 "Mango" by Jeff Prosise
Aug 30 2011 - 10AM PT

--Events September-----------------------------------------
Scott Guthrie Unplugged, Session 9
Sep 22 2011 - 10AM PT

Posted in: Development


TPL in Silverlight

August 10, 2011 at 11:05 AMalex

Nicely ported Silverlight TPL and examples of using it can be found here.

Posted in: Development


A robot that flies like a bird

July 31, 2011 at 11:23 PMalex

Posted in: R&D


Microsoft References Available

July 28, 2011 at 4:46 PMalex

Can be downloaded from:


Product Version
.NET 8
dotnetfx1434_VistaWin2k8sp1 50727.143
FXUpdate3074 50727.307
WCF 3.5SP1
WF 3.5SP1
Dotnetfx_Vista_SP2 50727.402
Dotnetfx_Win7_3.5.1 3.5.1
.Net 4
.NET_3.5_sp1_redist 50727.305
Netfx_3.5.1_Win7SP1 3.5.1

Posted in: Development


Visual Studio LightSwitch is out

July 26, 2011 at 3:42 PMalex

Posted in: Development


StreamInsight 503 The remote server returned an error: (503) Server Unavailable.

July 18, 2011 at 1:21 PMalex
Unable to connect to service


The HTTP service located at http://localhost/StreamInsight/Default is too busy.
The remote server returned an error: (503) Server Unavailable.
Server 2008 Std, Roles installed: IIS, SQL Svr 2008 R2. Need anything else ?


The endpoint not being active can also manifest as The HTTP service located at http://localhost/StreamInsight/Default is too busy. -------------------
The remote server returned an error: (503) Server Unavailable


If you follow the steps to diagnose and resolve this issue at:

but, if that does not help, and if you have IIS7 installed, change port number of your binding to 8080 so that it does not conflict with IIS security.

Posted in: Development | R&D


Adding custom soap headers in wcf

July 18, 2011 at 9:11 AMalex

 I’ve researched on the topic of SOAP header support in WCF and it seems that there are two primary ways for interaction with headers:

1.     Message contract definition:

WCF message contracts this also easily allows you to define and set WCF SOAP headers.

public class BankingTransaction
  public Operation operation;
  public DateTime transactionDate;
  private Account sourceAccount;
  private Account targetAccount;
  public int amount;

Here, the "operation" and the "transactionDate" are defined as SOAP headers.

2.     Inspecting headers via WCF Behaviors.
The client side
IClientMessageInspector defines two methods BeforeSendRequest and AfterReceiveReply
while the server side
IDispatchMessageInspector has the opposite methods, i.e. AfterReceiveRequest and BeforeSendReply.

With this, you could add headers to every message going across the wire (or selectively only to a few).

Here's a snippet from a IClientMessageInspector implementor:

public object BeforeSendRequest(ref Message request, IClientChannel channel)

    return null;

            There is a library on Codeplex WCF Extras it's an easy extension library for WCF which offers custom SOAP headers.

If clients are on .NET 2.0 and not using WCF this should still work just fine. Wecould still use the message inspector on the server side to sniff and extract the custom headers being sent by your .NET 2.0 clients. More details are here: Custom SOAP Headers: WCF and SMX. 

Posted in: Development | R&D