SourceID.NET -- Server Error in '/idp' Application

"Karl Swager" <[email protected]> Sun, 29 Jun 2003 12:53:43 -0400
Newsgroups gmane.comp.sourceid.sso.devel
Organization Precision Technologies, LLC
Message-ID <[email protected]>
Hope that this is the right place to post this.  I'm just getting started
working with Liberty Alliance spec and SourceID.  I'm working with the
latest SourceID.NET -- v.2 Alpha (06/27/2003).
 
When I try and run /localmachine/idp/ I get "Server Error in '/idp'
Application" (detail below).  This is happening after the certificate has
been loaded from file and has been confirmed to have a private key.  I'm
thinking the Org.Mentalis.Security.Certificates.Certificate class doesn't
expose the private key so we're moving it to a certificate class that does,
and after that move when we're trying to get the private key is where it is
breaking.
 
I've noticed that mentalis.org mentions a new release of their library by
the end of July.  Is it possible that this release was built with a
pre-release version of that new library?  I'm comfortable that the
certificate is valid as I can import it with the password and the
certificate manager shows that it has a private key.
 
Thanks.
Karl.
 
SourceID.NET v.2 Alpha (06/27/2003)
Windows XP Professional SP1
.NET Framework 1.1 (v1.1.4322)
Visual Studio .NET 2003 (v7.1.3088)
 
 
Server Error in '/idp' Application.
 
Cannot find the certificate and private key for decryption
 
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.ComponentModel.Win32Exception: Cannot find the
certificate and private key for decryption
 
Source Error:
Line 91:                 X509Certificate cert2 =
Line 92:                     new X509Certificate(cert.ToCerBuffer());
Line 93:                 return (RSACryptoServiceProvider) cert2.Key;
Line 94:             }
Line 95:             else
 
Source File:  c:\work\sourceid.net\sourceid\xmlutils.cs    Line: 93
 
Stack Trace:
[Win32Exception (0x80004005): Cannot find the certificate and private key
for decryption]
   Microsoft.Web.Services.Security.X509.X509Certificate.get_Key()
   SourceId.XmlUtils.GetCrypto(HttpApplicationState app) in
c:\work\sourceid.net\sourceid\xmlutils.cs:93
   SourceId.HttpHandlers.Manager.Init(HttpApplication context) in
C:\Work\SourceID.NET\SourceId\HttpHandlers\Manager.cs:173
   System.Web.HttpApplication.InitModules() +100
   System.Web.HttpApplication.InitInternal(HttpContext context,
HttpApplicationState state, MethodInfo[] handlers) +1295
 
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext
context) +392
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
context) +256
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +414
 
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573