Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Problem with COM+ component

Posted on 2001-08-21
8
215 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

856 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