Results 1 to 6 of 6

Thread: Please help...trouble with accessing COM object

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Please help...trouble with accessing COM object

    I have two COM objects, lets call them com1 and com2. I create instance of both objects through early binding like so:

    dim a as com1.Class1
    a = new com1.Class1

    dim b as com2.Class1
    b = new com2.Class1 '<--stops right here

    the first part(com1) compiles just fine, but when I get to com2, it tells me I need to do something with the access rights. I checked both com1 and com2, their access rights are identical and they are both in same folder. Any ideas on the problem?

    By the way, i'm using ASP.NET. Weird thing is, when I do it on just plain ASP(3.0), i have no problem on any of the objects.

  2. #2
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497

    Re: Please help...trouble with accessing COM object

    Can we get the exact compiler error message please?
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Please help...trouble with accessing COM object

    What does COM2 do/have that would cause such a permissions error?

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: Please help...trouble with accessing COM object

    Thanks for the question mendhak. It made me realize that com2 uses other files and I needed to change their permission too.

    Another question, the files that needed permission change already had "Everyone" account that basically had all box checked, but how come that didn't let me access?(I had to add User(MyMachine) account). Doesn't "Everyone" mean anyone can access it?

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Please help...trouble with accessing COM object

    I am not sure, because it should have worked if Everyone had full permissions on it. Nevertheless, it was safer that you added your username there. I am guessing that this has something to do with COM objects running under the security context of the user logged in, but I cannot expand upon that further.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: Please help...trouble with accessing COM object

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width