COM+ Configuration Issue

A

Abbas

Hello,

I have a COM+ application built using C# and the MSI for it runs just
dandy, its basically a COM proxy for .NET to ASP. However, when
running a test VBScript, I get the following message whenever I
attempt to execute one of the methods (object seems to get created
though)..


on this line: set objCreditAppEntity =
objComProxy.GetSavedApplication(1, "CITDE")


with this message: Error retrieving certificate with ID <> from
location LocalMachine
and this stack trace:
System.Configuration.ConfigurationException


Stack Trace:
at
CIT.EAI.Crypto.CertificateManager.RetrieveCertificateFromStore(X509Certific­
ateStore
store, String keyIdentifier)
at CIT.EAI.Crypto.CertificateManager.GetDefaultCertificate()
at CIT.EAI.Web.Security.WseUtilities.GetClientToken()
at
CIT.EAI.Web.Security.WseUtilities.ConfigureProxy(WebServicesClientProtocol
protocol)
at CIT.EAI.EFCanada.ComProxy.RepositoryFactory.GetCreditAppWS()
at
CIT.EAI.EFCanada.ComProxy.EFCanadaComProxy.GetSavedApplication(Int32
creditAppId, String applicationCode)


Any ideas why? seems to be a WSE thing, but I'm lost as I'm still
kind
of a newbie to COM, etc...This proxy talks to three web services by
the way.


VBScript test code given below
----------------------------------------------
Dim objComProxy
Dim arrContact
Dim errCode
Dim objCreditAppEntity
Dim objCreditAppEntityList
Dim objQuoteEntity
Dim objQuoteEntityList
dim xmlDoc, sPath, sFile, sInFileName


Set objComProxy =
CreateObject("CIT.EAI.EFCanada.ComProxy.EFCanadaComProxy")


'ERROR HERE
set objCreditAppEntity = objComProxy.GetSavedApplication(1, "CITDE")


WScript.Echo "Credit app ID: " & objCreditAppEntity.CreditAppId
WScript.Echo "Credit app status code: " &
objCreditAppEntity.CreditAppStatusCd
 
A

Abbas

Found the code causing the problem, but still dont know the problem...

Try

If store.OpenRead() Then

' Find the certificate based on the server's base64
key identifier
' This can be either a Windoes key indentifier or an
RFC3280 key identifier

Dim certs As X509CertificateCollection =
store.FindCertificateByKeyIdentifier(Convert.FromBase64String(keyIdentifier))


' Check to see if we found any certificates.

If certs.Count > 0 Then
' there should only be one cert since we used a
unique ID, so use the first in the array
cert = certs(0)
Else
' If we did not find any throw an exception

Throw New Exception("Key not found")
End If
End If
Catch ex As Exception
msg = String.Format("Error retrieving certificate with ID
<{0}> from location {1}", keyIdentifier, store.Location)
Throw New ConfigurationException(msg, ex)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top