Sign In
Decrypt my World
Cryptography, Security, Debugging and more!
MSDN Blogs
>
Decrypt my World
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Options
About
RSS for posts
Atom
RSS for comments
OK
Disclaimer, Maps & Favorite Posts
Any of my posts is supported under any Microsoft standard support program or service. They are provided "AS IS" without warranty of any kind, and confer no rights.
Where are my readers?
Favorite Posts
Do you need help right now?
CryptoAPI Tracer script
MANAGED DEBUGGING with WINDBG. Introduction and Index
Tags
ADSI
CAPICOM
Cdb
CertEnroll
CNG
CryptAcquireContext
CryptoAPI
Debugger scripts
Debugging
NT Services
P/Invoke
RSACryptoServiceProvider
SCard API
Smart Card
System.DirectoryServices
System.Security
VBScript
WinDbg
Windows 7
Windows SDK
Windows Server 2003
Windows Server 2008
Windows Vista
Windows XP
WMI
Archive
Archives
January 2012
(1)
November 2011
(12)
September 2011
(5)
June 2011
(1)
May 2011
(2)
April 2011
(1)
March 2011
(3)
February 2011
(6)
January 2011
(2)
December 2010
(5)
October 2010
(8)
September 2010
(1)
August 2010
(8)
July 2010
(3)
June 2010
(2)
May 2010
(4)
April 2010
(3)
March 2010
(4)
February 2010
(2)
January 2010
(5)
December 2009
(6)
November 2009
(2)
October 2009
(3)
September 2009
(5)
August 2009
(13)
July 2009
(8)
June 2009
(2)
May 2009
(7)
April 2009
(3)
March 2009
(2)
February 2009
(3)
January 2009
(3)
December 2008
(3)
November 2008
(2)
October 2008
(4)
September 2008
(4)
August 2008
(3)
July 2008
(3)
June 2008
(7)
May 2008
(6)
April 2008
(7)
March 2008
(10)
February 2008
(3)
January 2008
(4)
December 2007
(6)
November 2007
(4)
October 2007
(4)
Share this blog with others!!!
My Twitter (http://twitter.com/alejacma)
RSS
http://twitter.com/alejacma
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Decrypt my World
How to use INTERNET_OPTION_SERVER_CERT_CHAIN_CONTEXT with InternetQueryOption in C#
Posted
23 days ago
by
Alejandro Campos Magencio
0
Comments
Hi all, The other day I needed to use the certificate chain context ( CERT_CHAIN_CONTEXT structure ) returned by a call to InternetQueryOption , in C# . The call in C++ looks like this: PCCERT_CHAIN_CONTEXT CertCtx=NULL; … if (InternetQueryOption...
Decrypt my World
We can't manage printers with WMI in a clustered environment
Posted
3 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, Some time ago a customer of mine wanted to develop PowerShell scripts to manage printers in their clustered environment. They wanted to use WMI for that. The problem they found is that while they could list the printers on a stand-alone...
Decrypt my World
Unexpected black screen when using a custom Credential Provider
Posted
3 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, Some time ago I had a customer how had developed a custom credential provider to use with a third-party smartcard provider . This credential provider was a wrapper of MS Smartcard Credential Provider . They also put a credential provider...
Decrypt my World
Problems when compiling and running code that uses CertEnroll with .NET 4.0 and x64
Posted
3 months ago
by
Alejandro Campos Magencio
1
Comments
Hi all, The other day a customer of mine was trying to compile and run this CertEnroll sample of mine: How to create a certificate request with CertEnroll and .NET (C#) I had developed this sample against .NET 2.0 some time ago, and it compiled...
Decrypt my World
How to add Issuer Alternative Name to your certificate request (C#)
Posted
3 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, A customer of mine wanted to set Issuer Alternative Name ( XCN_OID_ISSUER_ALT_NAME2 - "2.5.29.18" ) extension to his certificate requests in C# in the same way we did this, and he didn't know how: How to add Subject Alternative Name to...
Decrypt my World
How to export our enrolled certificates programmatically
Posted
3 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, If you are creating certificate requests to enroll certificates programmatically and using a code like the following: How to create a certificate request with CertEnroll and .NET (C#) , you may need to export the enrolled certificate after...
Decrypt my World
How to access Certificate Enrollment Web Services from non-domain joined computers
Posted
3 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, You may know already this white paper to configure the Certificate Enrollment Web Services : Certificate Enrollment Web Services in Windows Server 2008 R2 " This paper explains how certificate enrollment Web services work in Windows...
Decrypt my World
How to add Friendly Name to your enrolled certificates programmatically
Posted
3 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, One of my customers was creating certificate requests programmatically with CertEnroll and a code like the following: How to create a certificate request with CertEnroll and .NET (C#) . He wanted to set Friendly Name for the enrolled certificate...
Decrypt my World
Certificate request won't set Key Usage to Digital Signature in enrolled certificate
Posted
3 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, The other day a customer of mine was creating certificate requests with a code like the following: How to create a certificate request with CertEnroll and .NET (C#) . He wanted to set the certificate's Key Usage to Digital Signature instead...
Decrypt my World
Certificate request doesn't allow the private key of the enrolled certificate to be exported
Posted
3 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, The other day a customer of mine was creating certificate requests with a code like the following: How to create a certificate request with CertEnroll and .NET (C#) . After he enrolled the certificates, he realized that when he tried to...
Decrypt my World
How to add Alternative Directory Name to your certificate request (C#)
Posted
3 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, We've already seen How to add Subject Alternative Name to your certificate requests (C#) . What if we want to set Alternative Directory Name ( XCN_CERT_ALT_NAME_DIRECTORY_NAME ) in addition to Subject Alternative Name ( XCN_CERT_ALT_NAME_RFC822_NAME...
Decrypt my World
How to add Subject Alternative Name to your certificate requests (C#)
Posted
3 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, The other day a customer of mine wanted to add Subject Alternative Name ( szOID_SUBJECT_ALT_NAME2 - "2.5.29.17" ) extension to his certificate requests in C# and he didn't know how. We have IX509ExtensionAlternativeNames interface for...
Decrypt my World
How to request a certificate programmatically using the Certificate Enrollment Web Services (C#)
Posted
3 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, Some time ago I mentioned a Microsoft SDK sample that uses CertEnroll to access the Certificate Enrollment Web Services and enroll a certificate using a template : How to access the new Certificate Enrollment Web Services programmatically...
Decrypt my World
How to customize error messages shown when changing password on Windows 7
Posted
4 months ago
by
Alejandro Campos Magencio
2
Comments
Hi all, A customer of mine wanted to change the error messages shown to users when changing their password on Windows 7, e.g. when new and old passwords won't match, or the old password of the user is invalid, etc. On Windows XP they did that with...
Decrypt my World
FaxSendDocument API does not return when called from a Windows service
Posted
4 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, Some time ago a customer of mine was developing a native application using Fax API , which worked fine on Windows Server 2003 . On Windows Server 2008 though, when the application was being run as a service , they could see that FaxSendDocument...
Decrypt my World
SChannel does not support SSL Fragmentation
Posted
4 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, When connecting to an SSL-enabled web site with Internet Explorer , the client and server must negotiate an SSL session . The server sends its list of trusted root certificates to the client in the form of a non-encrypted record. The server...
Decrypt my World
Big delay when calling SslStream.AuthenticateAsClient
Posted
4 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, Some time ago I had a customer who was opening a SSL connection on his C# application, and he was calling SslStream.AuthenticateAsClient . His problem was that this call was taking around 15 seconds for each connection he made. I debugged...
Decrypt my World
How to create a memory mapped file with C# (Windows Vista / Windows 7)
Posted
4 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, The following C# sample shows how to create a memory mapped file and use private namespaces to allow access to specific groups of users: FORM1.CS using System; using System.Collections.Generic; using System.ComponentModel; using...
Decrypt my World
How to verify validity of certificates with .NET
Posted
7 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, The other day a customer of mine was trying to verify the validity of a certificate with a .NET code like the following: Dim cert As X509Certificate2 = New X509Certificate2(filename) Dim chain As New X509Chain() chain.ChainPolicy.RevocationFlag...
Decrypt my World
X509Certificate2 raises "The Smart card resource manager is not running" exception
Posted
8 months ago
by
Alejandro Campos Magencio
2
Comments
Hi all, Some time ago a customer of mine was getting a CryptographicException with message "The Smart card resource manager is not running" when using X509Certificate2 object in a Windows service . This was the call stack at the point of exception...
Decrypt my World
SCardEstablishContext fails with SCARD_E_NO_SERVICE error
Posted
8 months ago
by
Alejandro Campos Magencio
1
Comments
Hi all, If you call SCardEstablishContext API in a Windows service running under a specific user account (domain\user) or NETWORK SERVICE , you may get the following error on Vista/Server 2008 or Windows 7/Server 2008 R2 : 0x8010001d - SCARD_E_NO_SERVICE...
Decrypt my World
How to automate a command line utility like DiskPart (vbscript)
Posted
9 months ago
by
Alejandro Campos Magencio
1
Comments
Hi all, The other day I created a VBScript to automate DiskPart.exe tool and be able to perform tasks on a disk after selecting it by LUN ID . Note that Diskpart only allow us to select disks by their index number or their location path. Bellow...
Decrypt my World
SignTool fails with error 0x80092006 on Windows Server 2008
Posted
10 months ago
by
Alejandro Campos Magencio
2
Comments
Hi all, The other day a customer of mine was trying to sign a binary with SignTool.exe using the following command line on Windows Server 2008 SP2 : Signtool.exe sign /a /f "c:\mycert.pfx" /p "password" /t "http://timestamp.verisign.com/scripts...
Decrypt my World
How to update "Run only specified windows applications" GPO programmatically (VBScript)
Posted
10 months ago
by
Alejandro Campos Magencio
0
Comments
Hi all, A customer of mine had to add a list of thousands of applications to the "Run only specified windows applications" GPO on his Windows Server 2008 . And obviously he wanted to automate this task to avoid adding them manually one at a time...
Decrypt my World
FileSystemWatcher class does not fire Change events when NotifyFilters.Size is used
Posted
10 months ago
by
Alejandro Campos Magencio
1
Comments
Hi all, A customer of mine was trying to monitor a .log file in a specific folder with .NET's FileSystemWatcher class and a code like the following: static void Main(string[] args) { FileSystemWatcher fsw = new FileSystemWatcher(@...
Page 1 of 9 (205 items)
1
2
3
4
5
»
Translate This Page
Translate this page
Powered by
Microsoft® Translator