Click here to Skip to main content
15,921,697 members
Home / Discussions / C#
   

C#

 
QuestionVisua studio 2008 Pin
anishkannan3-Mar-11 18:51
anishkannan3-Mar-11 18:51 
AnswerRe: Visua studio 2008 Pin
_AnsHUMAN_ 3-Mar-11 19:22
_AnsHUMAN_ 3-Mar-11 19:22 
QuestionDelete certificates programmatically Pin
NarVish3-Mar-11 18:34
NarVish3-Mar-11 18:34 
I created certificate by executing a batch file, which has the below commands.

cd C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
makecert -ss BBBC

On executing above batch file, its creating "BBBC" folder. It contains a default certificate. I would like to remove the default one by below code. But, I'm not getting any list in "fcollection" variable. Please correct the code to find default certificate in BBBC and remove the same.

X509Store store = new X509Store(StoreName.AuthRoot, StoreLocation.CurrentUser); 
store.Open(OpenFlags.ReadWrite | OpenFlags.MaxAllowed); 
X509Certificate2Collection collection = (X509Certificate2Collection)store.Certificates; 
X509Certificate2Collection fcollection = (X509Certificate2Collection)collection.Find(X509FindType.FindBySubjectName, "localhost", false); 
Console.WriteLine("Number of certificates: {0}{1}", fcollection.Count, Environment.NewLine); 
foreach (X509Certificate2 x509 in fcollection) 
{ 
     byte[] rawdata = x509.RawData; 
           Console.WriteLine("Friendly Name: {0}{1}", x509.FriendlyName, Environment.NewLine); 
     Console.WriteLine("Simple Name: {0}{1}", x509.GetNameInfo(X509NameType.SimpleName, true), Environment.NewLine); 
                store.Remove(x509); 
     Console.WriteLine("X509Certificate2 for localhost removed."); 
} 
store.Close();

AnswerRe: Delete certificates programmatically Pin
NarVish3-Mar-11 18:45
NarVish3-Mar-11 18:45 
QuestionAdding your own toolbox controls to the IDE and linking up their events... Pin
code-frog3-Mar-11 12:25
professionalcode-frog3-Mar-11 12:25 
AnswerRe: Adding your own toolbox controls to the IDE and linking up their events... Pin
N a v a n e e t h3-Mar-11 13:54
N a v a n e e t h3-Mar-11 13:54 
QuestionAdding a socket to application Pin
Bob Pawley3-Mar-11 12:14
Bob Pawley3-Mar-11 12:14 
AnswerRe: Adding a socket to application Pin
N a v a n e e t h3-Mar-11 13:44
N a v a n e e t h3-Mar-11 13:44 
AnswerRe: Adding a socket to application Pin
Groulien3-Mar-11 23:43
Groulien3-Mar-11 23:43 
Questioncan anyone help me with this code complilation Pin
rickysharp3-Mar-11 9:53
rickysharp3-Mar-11 9:53 
AnswerRe: can anyone help me with this code complilation Pin
Pete O'Hanlon3-Mar-11 9:58
mvePete O'Hanlon3-Mar-11 9:58 
AnswerRe: can anyone help me with this code complilation Pin
Luc Pattyn3-Mar-11 10:02
sitebuilderLuc Pattyn3-Mar-11 10:02 
AnswerRe: can anyone help me with this code complilation Pin
OriginalGriff3-Mar-11 21:49
mveOriginalGriff3-Mar-11 21:49 
QuestionMove Email Pin
MWRivera3-Mar-11 9:02
MWRivera3-Mar-11 9:02 
AnswerRe: Move Email Pin
Pete O'Hanlon3-Mar-11 9:31
mvePete O'Hanlon3-Mar-11 9:31 
GeneralRe: Move Email Pin
MWRivera3-Mar-11 10:09
MWRivera3-Mar-11 10:09 
GeneralRe: Move Email Pin
Pete O'Hanlon3-Mar-11 11:32
mvePete O'Hanlon3-Mar-11 11:32 
GeneralRe: Move Email Pin
MWRivera3-Mar-11 11:44
MWRivera3-Mar-11 11:44 
GeneralRe: Move Email Pin
Pete O'Hanlon3-Mar-11 21:36
mvePete O'Hanlon3-Mar-11 21:36 
GeneralRe: Move Email Pin
MWRivera7-Mar-11 9:40
MWRivera7-Mar-11 9:40 
QuestionC# Pin
Karo1113-Mar-11 8:24
Karo1113-Mar-11 8:24 
AnswerRe: C# Pin
OriginalGriff3-Mar-11 9:06
mveOriginalGriff3-Mar-11 9:06 
GeneralRe: C# Pin
Pravin Patil, Mumbai4-Mar-11 0:06
Pravin Patil, Mumbai4-Mar-11 0:06 
QuestionMake window dock/undock to parent window Pin
manchukuo3-Mar-11 8:18
manchukuo3-Mar-11 8:18 
QuestionIs there a way to search through all buttons of a window handle? Pin
turbosupramk33-Mar-11 6:14
turbosupramk33-Mar-11 6:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.