accessing com+ object using ASP

Hello all,
Perhaps you can help me. I have a com object which I converted from VB6 to VB.NET. I am using this com object with other .Net applications without any problem. However, I am now trying to use this com object in some old ASP code which I have not yet converted. I want to use the com object because it contains some additional functionallity that the original com object did not possess. The ASP code works fine when calling the old com object. BUT..if I change the code to call the new com object, it takes a very very (60secs.) long time for the object to be instantuated. In other words, when the code hits the CreateObject line, it takes 60 secs to execute. The rest of the calls to the methods of that com object execute normally. What am I doing wrong? I am including code snipplets of both the VB.NET com object and the ASP page.

Thank you in advance.

Michael Gisonda

VB.NET
Option Strict Off
Option Explicit On
Imports System.EnterpriseServices
Imports System.Reflection
Imports System.Runtime.InteropServices

<Assembly: AssemblyVersion("3.0.0.0")>
<Assembly: ComCompatibleVersionAttribute(1, 0, 0, 0)>
<Assembly: ApplicationName("EstSyspro_NET")>
<Assembly: AssemblyKeyFileAttribute("N:\Projects\Estimpact.net\bin\EstSyspro.snk")>

<System.Runtime.InteropServices.ProgId("EstSyspro_NET.Custinfo")> Public Class Custinfo
Inherits ServicedComponent
Private gImpConn As ADODB.Connection
Private mConnection As Object

<AutoComplete()> Public Function GetBlanketContractInfo(ByVal contract As String, ByVal stockcode As String, Optional ByVal companyid As String = "L") As ADODB.Recordset

Dim sSQL As String
Dim rsRetRecord As New ADODB.Recordset
Dim rsGetRec As New ADODB.Recordset
Dim lLocalConnection As New ADODB.Connection

'Take the company id provided by the user and make it capitalized and only the first letter.
companyid = UCase(Trim(Mid(companyid, 1, 1)))

'Set the connection string to the proper company based on the companyid
lLocalConnection.ConnectionString = fnGetConnectionString(companyid)

'Open the connection.
lLocalConnection.Open()

sSQL = "SELECT SorContractPrice.ContractType, SorContractPrice.StockCode, " & "SorContractPrice.Contract, SorContractPrice.StartDate, " & "SorContractPrice.ExpiryDate, SorContractPrice.PriceMethod," & "SorContractPrice.FixedUom, SorContractPrice.FixedPriceCode, " & "SorContractPrice.FixedPrice " & "FROM SorContractPrice " & "WHERE SorContractPrice.Contract= '" & contract & "' " & "AND SorContractPrice.StockCode= '" & stockcode & "'"

rsGetRec = lLocalConnection.Execute(sSQL)

If Not rsGetRec.BOF And Not rsGetRec.EOF Then
rsRetRecord = MakeRS(rsGetRec)
OpenAndFillRS(rsGetRec, rsRetRecord)
Else
rsRetRecord = Nothing
End If

'Clean up
rsGetRec.Close()
rsGetRec = Nothing
lLocalConnection.Close()
lLocalConnection = Nothing

GetBlanketContractInfo = rsRetRecord

End Function
End Class

END VB.NET --

[3283 byte] By [MichaelGisonda] at [2007-12-24]
# 1

you will get a quicker and better response if you post your asp questions at http://forums.asp.net

DMan1 at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic Language...