Cannot instantiate a X509SecurityToken object in MFC C++
From: kenneth (kenneth_at_discussions.microsoft.com)
Date: 03/30/05
- Next message: Jakub Gwozdz: "Re: Blocking WLX_SAS_TYPE_SC_INSERT"
- Previous message: Michel Gallant: "Re: CAPICOM HashedData, java and binary files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 30 Mar 2005 06:47:04 -0800
Hello,
I am trying to incorporate security into my Web Service. I am attempting to
have my client (MFC C++) connect to my .net Web Service (C#) in a secure
manner. The first thing I am doing is trying to obtain a certificate:
-------------
//First action to do is to retrieve a certificate that will be added to the
SOAP message
X509CertificateStore *store =
X509CertificateStore::CurrentUserStore(X509CertificateStore::RootStore->ToString());
store->OpenRead();
X509CertificateCollection *col =
(X509CertificateCollection*)store->FindCertificateBySubjectString("");
if( col->Count == 0 )
return;
X509Certificate* cert = col->get_Item(0);
X509SecurityToken* x509st = new X509SecurityToken(cert);
----------------
However, I receive the following error:
error C3828: 'Microsoft::Web::Services::Security::X509SecurityToken':
placement arguments not allowed while creating instances of managed classes
Could someone give me any pointers as to what I am doign wrong? Or if
possible, send me some code snippets on how to do this in MFC C++?
Thanks for any help offered!
- Next message: Jakub Gwozdz: "Re: Blocking WLX_SAS_TYPE_SC_INSERT"
- Previous message: Michel Gallant: "Re: CAPICOM HashedData, java and binary files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|