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 "CN=www.yourserver.com" -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12

Posted in: Development

Tags:

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

Tags:

Coarsening

August 16, 2011 at 1:10 AMalex

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

Posted in: R&D

Tags:

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
http://lidnug-richter.eventbrite.com/

Azure for Developers by Robin Shahan (MVP)
Aug 26 2011 - 10AM PT
http://lidnug-azurerobin.eventbrite.com/

What's new in Windows Phone 7.1 "Mango" by Jeff Prosise
Aug 30 2011 - 10AM PT
http://lidnug-prosise.eventbrite.com/

--Events September-----------------------------------------
Scott Guthrie Unplugged, Session 9
Sep 22 2011 - 10AM PT
http://lidnug-scottgu9.eventbrite.com/

Posted in: Development

Tags:

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

Tags:

A robot that flies like a bird

July 31, 2011 at 11:23 PMalex

Posted in: R&D

Tags:

Microsoft References Available

July 28, 2011 at 4:46 PMalex

Can be downloaded from: http://referencesource.microsoft.com/netframework.aspx

 

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

Posted in: Development

Tags:

Visual Studio LightSwitch is out

July 26, 2011 at 3:42 PMalex

Posted in: Development

Tags:

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

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

Description

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
.

image

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

http://blogs.msdn.com/b/appfabriccat/archive/2010/10/21/streaminsight-getting-started-with-using-the-event-flow-debugger-viewing-diagnostics-and-exposing-the-management-service.aspx

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

Tags:

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.

[MessageContract]
public class BankingTransaction
{
  [MessageHeader]
  public Operation operation;
  [MessageHeader] 
  public DateTime transactionDate;
  [MessageBodyMember] 
  private Account sourceAccount;
  [MessageBodyMember] 
  private Account targetAccount;
  [MessageBodyMember] 
  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)
{
    …
    request.Headers.Add(header);

    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

Tags: