Click here to Skip to main content
15,918,808 members
Home / Discussions / C#
   

C#

 
AnswerRe: & in binary numbers ! Pin
Keith Barrow20-Aug-09 3:47
professionalKeith Barrow20-Aug-09 3:47 
QuestionSynchronization between online and offline database. [modified] Pin
Member 399406320-Aug-09 3:19
Member 399406320-Aug-09 3:19 
AnswerRe: Synchronization between online and offline database. [modified] Pin
Saksida Bojan20-Aug-09 7:40
Saksida Bojan20-Aug-09 7:40 
AnswerRe: Synchronization between online and offline database. [modified] Pin
Verma Ankit2-Apr-10 2:21
Verma Ankit2-Apr-10 2:21 
QuestionMethodInfo - Get summary - How can i get the methods summary from a method ? Pin
bonzaiholding20-Aug-09 2:50
bonzaiholding20-Aug-09 2:50 
AnswerRe: MethodInfo - Get summary - How can i get the methods summary from a method ? Pin
Luc Pattyn20-Aug-09 3:25
sitebuilderLuc Pattyn20-Aug-09 3:25 
GeneralRe: MethodInfo - Get summary - How can i get the methods summary from a method ? Pin
bonzaiholding20-Aug-09 3:39
bonzaiholding20-Aug-09 3:39 
QuestionError while reading the Private Key as XML String in C# Pin
Jadhav Ajay20-Aug-09 2:11
professionalJadhav Ajay20-Aug-09 2:11 
My C# web application is trying to read the Private Key of the our own digital certificate installed on Windows 2008 Server, when it needs to decrypt the data received from the web request.

Following is the C# code:

X509Certificate2 cert = GetCert(thumbPrintOfPrivKey, StoreName.My, StoreLocation.CurrentUser);

try
{
  string privateKey = cert.PrivateKey.ToXmlString(true);

  log.Info("Retrieved Private Key....");
  rsacsp.FromXmlString(privateKey);
}
catch
 (Exception e)
{
  string msg = "Unable to Read the Private Key: ";
  log.Error(msg + e.Message);
  throw new Exception(msg, e);
}


And following line of above-mentioned code throws an error.
string privateKey = cert.PrivateKey.ToXmlString(true);


The error which I get is: - "The system cannot find the file specified."
And following is the stack Trace:
at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
   at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
   at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
   at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
   at System.Security.Cryptography.RSACryptoServiceProvider..ctor(CspParameters parameters)
   at System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey()
   at VemoSSO.SSOUtility.ProcessData(String decodedSig, String decodedToken, String combined) in 


When I checked my Application Event Logs to see what exactly is happening, the event log showed that the "CertificateServicesClient" has stopped. And I noticed that it gets started automatically when I logon to the server.

Can anybody help me in finding the reason as to why this service? stops and starts automatically, and can we restart it immediately the moment it stops?

Thanks in advance.

-----
Ajay Jadhav
http://www.divinet.co.in

QuestionToon Production?? Pin
Muammar©20-Aug-09 1:42
Muammar©20-Aug-09 1:42 
AnswerRe: Toon Production?? Pin
OriginalGriff20-Aug-09 1:50
mveOriginalGriff20-Aug-09 1:50 
GeneralRe: Toon Production?? Pin
Muammar©20-Aug-09 1:59
Muammar©20-Aug-09 1:59 
GeneralRe: Toon Production?? Pin
molesworth20-Aug-09 5:19
molesworth20-Aug-09 5:19 
AnswerRe: Toon Production?? Pin
Pete O'Hanlon20-Aug-09 2:11
mvePete O'Hanlon20-Aug-09 2:11 
JokeRe: Toon Production?? Pin
0x3c020-Aug-09 2:21
0x3c020-Aug-09 2:21 
GeneralRe: Toon Production?? Pin
Muammar©20-Aug-09 7:42
Muammar©20-Aug-09 7:42 
GeneralRe: Toon Production?? Pin
Muammar©20-Aug-09 2:26
Muammar©20-Aug-09 2:26 
GeneralRe: Toon Production?? Pin
riced20-Aug-09 12:06
riced20-Aug-09 12:06 
AnswerRe: Toon Production?? Pin
Richard MacCutchan25-Aug-09 10:42
mveRichard MacCutchan25-Aug-09 10:42 
GeneralRe: Toon Production?? Pin
Muammar©25-Aug-09 11:08
Muammar©25-Aug-09 11:08 
GeneralRe: Toon Production?? Pin
Richard MacCutchan26-Aug-09 3:15
mveRichard MacCutchan26-Aug-09 3:15 
QuestionHow to unregister the Event for a clicked tag ? Pin
Jacobb Michael20-Aug-09 1:15
Jacobb Michael20-Aug-09 1:15 
AnswerRe: How to unregister the Event for a clicked tag ? Pin
Luc Pattyn20-Aug-09 2:12
sitebuilderLuc Pattyn20-Aug-09 2:12 
GeneralRe: How to unregister the Event for a clicked tag ? Pin
Jacobb Michael20-Aug-09 6:16
Jacobb Michael20-Aug-09 6:16 
GeneralRe: How to unregister the Event for a clicked tag ? Pin
Luc Pattyn20-Aug-09 13:37
sitebuilderLuc Pattyn20-Aug-09 13:37 
GeneralRe: How to unregister the Event for a clicked tag ? Pin
Jacobb Michael20-Aug-09 17:24
Jacobb Michael20-Aug-09 17:24 

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.