473,385 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

COM+ Application Config. Issue

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.RetrieveCertific ateFromStore(X509CertificateStore
store, String keyIdentifier)
at CIT.EAI.Crypto.CertificateManager.GetDefaultCertif icate()
at CIT.EAI.Web.Security.WseUtilities.GetClientToken()
at
CIT.EAI.Web.Security.WseUtilities.ConfigureProxy(W ebServicesClientProtocol
protocol)
at CIT.EAI.EFCanada.ComProxy.RepositoryFactory.GetCre ditAppWS()
at
CIT.EAI.EFCanada.ComProxy.EFCanadaComProxy.GetSave dApplication(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.EFCanadaCo mProxy")

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

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

May 25 '07 #1
6 1841
Abbas,

Do you have a configuration file that WSE uses to set up the proxies
that you use to call the services? Have you deployed that with your COM+
application?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Abbas" <al******@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
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.RetrieveCertific ateFromStore(X509CertificateStore
store, String keyIdentifier)
at CIT.EAI.Crypto.CertificateManager.GetDefaultCertif icate()
at CIT.EAI.Web.Security.WseUtilities.GetClientToken()
at
CIT.EAI.Web.Security.WseUtilities.ConfigureProxy(W ebServicesClientProtocol
protocol)
at CIT.EAI.EFCanada.ComProxy.RepositoryFactory.GetCre ditAppWS()
at
CIT.EAI.EFCanada.ComProxy.EFCanadaComProxy.GetSave dApplication(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.EFCanadaCo mProxy")

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

WScript.Echo "Credit app ID: " & objCreditAppEntity.CreditAppId
WScript.Echo "Credit app status code: " &
objCreditAppEntity.CreditAppStatusCd
May 25 '07 #2
Nicholas,

I am taking over this project from my team lead who left, and it has
been deployed once before to our development server (I am just making
updates) so I am sure there is a configuration file, would this file
happen to have a .config extension? (I'm not in the office and hence
can't browse myself). Also, how would I deploy the file, manually or
through the MSI?

Thanks

On May 25, 6:57 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Abbas,

Do you have a configuration file that WSE uses to set up the proxies
that you use to call the services? Have you deployed that with your COM+
application?

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
May 26 '07 #3
Abbas,

Check out this blog article on setting up configuration files for COM+
applications when developed in .NET:

http://blog.devstone.com/aaron/archi...10/18/310.aspx

It should help you find the configuration file for your COM+ app (which
I believe the original problem stems from) and then allow you to proceed
from there.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Abbas" <al******@gmail.comwrote in message
news:11**********************@q66g2000hsg.googlegr oups.com...
Nicholas,

I am taking over this project from my team lead who left, and it has
been deployed once before to our development server (I am just making
updates) so I am sure there is a configuration file, would this file
happen to have a .config extension? (I'm not in the office and hence
can't browse myself). Also, how would I deploy the file, manually or
through the MSI?

Thanks

On May 25, 6:57 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
>Abbas,

Do you have a configuration file that WSE uses to set up the proxies
that you use to call the services? Have you deployed that with your COM+
application?

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
May 27 '07 #4
I looked within the DLL directory and discovered that there is a
configuration file, which looks like:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="CIT.EAI.EFCanada.ComProxy.CreditAppWS.CreditA pplication"
value="http://repositoryservice/CreditApplication.asmx" />
<add key="CIT.EAI.EFCanada.ComProxy.QuoteWS.Quote" value="http://
repositoryservice/Quote.asmx" />
<add key="CIT.EAI.EFCanada.ComProxy.CustomerSearchWS.Se archCustomer"
value="http://customersearchservice/SearchCustomer.asmx"/>
<add
key="CIT.EAI.EFCanada.ComProxy.FinancialCalculator WS.FinancialCalculator"
value="http://159.3.133.80/CalculatorService/FinancialCalculator.asmx"/
>
<add key="MessageQueueName"
value="FormatName:DIRECT=OS:stsbizdev01\CitDigital EdgeEFCanSubmittal" /
>
</appSettings>
</configuration>

I tried to rename this file from its original name given to
application.config and started getting this error instead:
Value cannot be null. Parameter name: Url

However, looking at the currently deployed COM, the config file is
still named CIT.EAI.EFCanada.ComProxy.config
On May 27, 10:53 am, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Abbas,

Check out this blog article on setting up configuration files for COM+
applications when developed in .NET:

http://blog.devstone.com/aaron/archi...10/18/310.aspx

It should help you find the configuration file for your COM+ app (which
I believe the original problem stems from) and then allow you to proceed
from there.
May 28 '07 #5
Located the code throwing the error:

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.FromB ase64String(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)

On May 28, 10:41 am, Abbas <aljam...@gmail.comwrote:
I looked within the DLL directory and discovered that there is a
configuration file, which looks like:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="CIT.EAI.EFCanada.ComProxy.CreditAppWS.CreditA pplication"
value="http://repositoryservice/CreditApplication.asmx" />
<add key="CIT.EAI.EFCanada.ComProxy.QuoteWS.Quote" value="http://
repositoryservice/Quote.asmx" />
<add key="CIT.EAI.EFCanada.ComProxy.CustomerSearchWS.Se archCustomer"
value="http://customersearchservice/SearchCustomer.asmx"/>
<add
key="CIT.EAI.EFCanada.ComProxy.FinancialCalculator WS.FinancialCalculator"
value="http://159.3.133.80/CalculatorService/FinancialCalculator.asmx"/

<add key="MessageQueueName"
value="FormatName:DIRECT=OS:stsbizdev01\CitDigital EdgeEFCanSubmittal" /

</appSettings>
</configuration>

I tried to rename this file from its original name given to
application.config and started getting this error instead:
Value cannot be null. Parameter name: Url

However, looking at the currently deployed COM, the config file is
still named CIT.EAI.EFCanada.ComProxy.config

On May 27, 10:53 am, "Nicholas Paldino [.NET/C# MVP]"

<m...@spam.guard.caspershouse.comwrote:
Abbas,
Check out this blog article on setting up configuration files for COM+
applications when developed in .NET:
http://blog.devstone.com/aaron/archi...10/18/310.aspx
It should help you find the configuration file for your COM+ app (which
I believe the original problem stems from) and then allow you to proceed
from there.- Hide quoted text -

- Show quoted text -

May 28 '07 #6
If anyone is interested to the solution...

1) make sure you have installed your certificate to be used by WSE
2) I needed an entry in my machine.config file which the WSE utility
reads to get key information for encryption

Cheers!

May 30 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Matt Calhoon | last post by:
Hi there, I have a webfarm which contains several ii6 web servers. A .net web application is running fine on all servers except one where I will occasionally get the error below; If I restart...
12
by: Anil Krishnamurthy | last post by:
We have an ASP.NET application that uses COM objects through Interop. The web application requires access to network and database resources and hence, needs to impersonate a domain account. The...
3
by: Damian | last post by:
Hi everyone I'm having an issue with one of our applications. I'm getting the following error when attempting to log in to the site: Server Error in 'xxxxxxxxxxxxxxxx' Application....
1
by: Jen | last post by:
Hi, I'm having an issue calling a dll from an ASP.NET page. The code that tries to instantiate a COM dll (class) is in a Class Library. I can call the code successfully from a windows...
2
by: Chris_24 | last post by:
To all, I am experiencing difficulties with an asp.net web application and its web.config file. No matter what I try I keep getting the following error: Server Error in '/action' Application....
3
by: Rachel | last post by:
Hi, I am using the data access application block successfully in our development environment, however when I deploy to our testing server as Private Assemblies I keep getting the following ...
0
by: Laura Papez | last post by:
(note: orginally posted to the dotnet.framework.webservices.enhancements folks - thought this group may have more experience in this area. Ta, Laura.) Hi, I have created a secure Web Service...
9
by: Dave Booker | last post by:
When I run a particular application I've been working on for a while, it somehow finds a value for the Application Setting "Test.Properties.Settings.Default.ProjectPath", but I can't see where it...
3
by: MP | last post by:
Hi, I have a library in which I use the COM+ services dynamically for creating a Folder in the virtual directory of the Web Application on the Web Server. As ASPNET account does not have...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.