Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problem with COM+ component

Posted on 2001-08-21
8
Medium Priority
?
222 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

885 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