Solved

Problem with COM+ component

Posted on 2001-08-21
8
213 Views
Last Modified: 2008-03-17
I am writing my first COM+ component, to provide authentication on our intranet. The following code produces an "Automation error - library not registered":

Public Function IsAuthenticated() As Boolean

   Dim objContext As ObjectContext
   Dim objRequest As Request

   Set objContext = GetObjectContext()
   Set objRequest = objContext.Item("Request")

   ...

   objContext.SetComplete
End Function

at the "Set objRequest" line. I've included the COM+ Services Type Library and the Active Server Pages Object Library in the Project|References...

Any idea what's wrong?
0
Comment
Question by:CtrlAltDel
8 Comments
 
LVL 1

Expert Comment

by:Madmarlin
ID: 6410088
Not 100% sure but I have a feeling that it may be related to the binding.

At present you using early binding which may mean that your types are not recognised.

Try using late binding and see if you get the same error..

If you need examples let me know and I'll try and knock something up..


Madmarlin
0
 
LVL 7

Expert Comment

by:Z_Beeblebrox
ID: 6411027
Are you running this in the VB IDE? Unless you configure it very carefully, VB will return nothing for GetObjectContext because it is not running in COM+ so has no context. If you are developping on a Windows 2000 machine, it is possible to debug a component under COM+, and so get the context, but I don't remember where I found the article that explained this. Anyways, try placing a msgbox before and after that line, compiling it, and then running it under com+.

Zaphod.
0
 
LVL 1

Author Comment

by:CtrlAltDel
ID: 6412452
>Beeblebrox - yup it's running in the IDE. I added in a MsgBox before the problem line, and that pops up no problem. It still goes on then to fail at the usual place with the same error as before.

The annoying bit is I'm following the code samples in an O'Reilly book (Developing ASP Components) and it *still* doesn't work.

I feel an increase in points awarded coming on...
0
 
LVL 1

Author Comment

by:CtrlAltDel
ID: 6412826
OK, solution found here

http://www.vb2themax.com/HtmlDoc.asp?Table=Articles&ID=280

The short version is that the component was registered with Component Services, which conflicts with the VB IDE. Unregistering the component fixed the problem.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:CtrlAltDel
ID: 6412828
How annoying... many thanks for suggestions though.
0
 
LVL 7

Expert Comment

by:Z_Beeblebrox
ID: 6415856
Hi, no problem. You should ask Customer Service to reduce the points of this question to 0 and the PAQ it so other people can find it.

Zaphod.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7202418
Hi CtrlAltDel,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

CtrlAltDel, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7216011
Per recommendation, points refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to skip loop 6 55
Put text in a picture ASP.NET C# 2 50
Notepad++ how to remove delimiter : from beggning of the line? 3 94
Problem to With line 4 42
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now