Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem with COM+ component

Posted on 2001-08-21
8
Medium Priority
?
221 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
[X]
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
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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

688 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