haha... Now .NET also runs on Linux using Mono... Gender (sorry Platform) Agnostic... ;P
----- AJ
haha... Now .NET also runs on Linux using Mono... Gender (sorry Platform) Agnostic... ;P
----- AJ
Yes, it is.
----- Ajay Jadhav http://www.divinet.co.in
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 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 SSO.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 please help me in finding the reason as to why this service(?) stops and starts automatically, and how can we restart it immediately the moment it stops? Thanks in advance.
----- Ajay Jadhav http://www.divinet.co.in
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
Thank you Ramesh for the information. Your comments are really helpful for me to take further decisions.
----- Ajay Jadhav http://www.divinet.co.in
Hi friends, One of our customers has decided to migrate an existing Ruby on Rails application with MySQL DB backend to ASP.NET with C# (.NET 3.5) with SQL Server 2005/2008. I have few questions about it. 1. Has anybody already done such migration? 2. Is there any recommended way to do this migration? 3. Are there any tools available helping in this type of migration? Any comments/help would really be appreciated.
----- Ajay Jadhav http://www.divinet.co.in
Hi Paddy, Thank you for your response. I just checked on the Server, but PowerPoint 2007 is installed there. Looks like something related to permissions, but I am not sure what the solution is.
----- Ajay Jadhav http://www.divinet.co.in
Hi, I have developed a web application which opens the PPT 2007 using asp.net 3.5. With Office 2003 on Windows XP it works fine, but when installed on Windows 2008 Server which has .Net3.5 and Office 2007 gives the following error: Error:
Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80080005.
StackTrace:
Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80080005.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80080005.
Source Error: Line 141:Line 142: //init PowerPoint
Line 143: PowerPoint.Application powerPoint = new PowerPoint.Application();
Line 144: PowerPoint.Presentation ppt = powerPoint.Presentations.Add(MsoTriState.msoTrue);
Line 145:
Source File: c:\inetpub\wwwroot\VemoWeb\App_Code\PPTChart.cs Line: 143
Stack Trace:
[COMException (0x80080005): Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80080005.]
Dundas.Charting.Utilities.ChartPPTExport.CreatePPT(String chartImageFileName, String pptOutputFile) in c:\inetpub\wwwroot\VemoWeb\App_Code\PPTChart.cs:143
[ChartPPTExportException: ChartPPTExportException: Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80080005.]
Dundas.Charting.Utilities.ChartPPTExport.CreatePPT(String chartImageFileName, String pptOutputFile) in c:\inetpub\wwwroot\VemoWeb\App_Code\PPTChart.cs:208
UserControls_Export.imgPPT_Click(Object sender, ImageClickEventArgs e) in c:\inetpub\wwwroot\VemoWeb\UserControls\Export.ascx.cs:142
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +108
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +118
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEve