[ERROR MESSAGE:]
Unable to cast COM object of type 'System.__ComObject' to interface
type 'Manage.Statistics.IManageStats'. This operation failed because
the QueryInterface call on the COM component for the interface with IID
'{4C2875B5-3265-306B-9C74-1BEC98986B1A}' failed due to the following
error: Error loading type library/DLL. (Exception from HRESULT:
0x80029C4A (TYPE_E_CANTLOADLIBRARY)).
The client is calling a method shown below (exposed by a custom written
COM+ Application):
dim blnResult as Boolean
dim m_ManageStats as Manage.Statistics.IManageStats = new
Manage.Statistics.ManageStats
'*** Exception thrown by the following statment ***
blnResult = m_ManageStats.DeleteStatSheetWorkItem(intStatWorkI temID)
NB. The call should flow as shown:
--------------------------------------
[Client App]<-->[Application Proxy]<-->[COM+ Application]<-->[SQL
Server 2000 DBMS]<-->[Database Stored Procedure]
The interfaces etc are summarised below.
N.B. Some of the exposed methods in the same interface below work as
expected.
ALSO The client works fine when calling methods on the same host as
COM+ Application.
Below is the header for the 'ManageStats' COM+ Application
After Building the ManageStats.dll it is installed and registered as
followed:
Regsvcs.exe ManageStats.dll 'Installs and registers the COM+
Application called "IPB Business Services"
GacUtil.exe /i ManageStats.dll 'Intalls the assembly in the Global
Assembly Cache - Doesn't work without this.
<Assembly: ApplicationName("IPB Business Services")>
<Assembly: ApplicationActivation(ActivationOption.Server)>
<Assembly: Description("IPB Business Services - Application Component
Services")>
<Assembly: AssemblyKeyFileAttribute("sgMStats.snk")>
<Assembly: ApplicationAccessControl(True)>
Namespace Statistics
Public Interface IManageStats
Function DeleteStatSheetWorkItem(ByRef intStatWorkItemID As Short)
As Boolean
Function GetWorkItems() As ADODB.Recordset
Function GetSubmittedSheets(ByRef sUserName As String) As
ADODB.Recordset
Function GetWorkItemDetail(ByRef intDailyStatID As Short) As
ADODB.Recordset
End Interface
<ConstructionEnabled( _
[Default]:="DBServer=, Database=, DBUserName=, DBPassword="), _
ComponentAccessControl(True), _
Transaction(TransactionOption.Required)> _
Public Class ManageStats
Inherits ServicedComponent
Implements Statistics.IManageStats
Public Function DeleteStatSheetWorkItem(ByRef intStatWorkItemID As
Short) _
As Boolean _
Implements
Statistics.IManageStats.DeleteStatSheetWorkItem ....
Public Function GetWorkItems() As ADODB.Recordset _
Implements
Statistics.IManageStats.GetWorkItems ....
End Class
End Namespace
--
mminto
------------------------------------------------------------------------
mminto's Profile:
http://www.hightechtalks.com/m771
View this thread:
http://www.hightechtalks.com/t2337796