Archive for the ‘Source Code’ Category

The IX509CertificateRequestPkcs10 InitializeFromTemplateName adventure

This week has been researches, tests and headaches to be able to make request on a Certificate Authority server from a web application.
My client has a Win server 2008 CA server for my developments
On this server I have a certificate template named “User Template”

My assignment was to request a certificate via an ASP.NET application.
After researches [...]

More »

How long need a portion of code to be executed ?

Use the Stopwatch object !

using System.Diagnostics;

// …

Stopwatch myStopWatch = Stopwatch.StartNew();

// some code

myStopWatch.Stop();

Console.WriteLine("{0} ms – {1} ticks", myStopWatch.Elapsed.TotalMilliseconds, myStopWatch.ElapsedTicks);

// …

More »