p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_components thread: Access Denied Error Question


Message #1 by "Brad Urani" <bradurani@y...> on Sun, 8 Dec 2002 20:25:56
I've created a DLL on my W2K Professional development machine in vb that 
I'm trying to access via ASP. I've registered the DLL with the system and 
I know it works, because I can access it from another VB program, but when 
I try to access it with Server.CreateObject() from an ASP page I get an 
Access denied error. I've already run the DCOMCNFG utilitiy and allowed 
Access and Launch permissions for All users inclusing IUSR_<machine name> 
and INTERACTIVE (and Everyone for that matter) but still I get 

Error Type:
Server object, ASP 0178 (0x80070005)
The call to Server.CreateObject failed while checking permissions. Access 
is denied to this object.
/cosmic_local/Default.asp, line 45


Any help would be appreciated
-Brad
Message #2 by "SEAK, Teng-Fong" <tfseak@f...> on Mon, 9 Dec 2002 15:13:10 +0100
What's in line 45 then?

You said you've given "Access and Launch" permissions for All users, do 
you
mean "Read & execute" when you check the file's properties > Security ?

> -----Message d'origine-----
> De : Brad Urani [mailto:bradurani@y...]
> Envoy=C3=A9 : dimanche 8 d=C3=A9cembre 2002 21:26
> =C3=80 : ASP components
> Objet : [asp_components] Access Denied Error Question
>
>
> I've created a DLL on my W2K Professional development machine
> in vb that
> I'm trying to access via ASP. I've registered the DLL with
> the system and
> I know it works, because I can access it from another VB
> program, but when
> I try to access it with Server.CreateObject() from an ASP
> page I get an
> Access denied error. I've already run the DCOMCNFG utilitiy
> and allowed
> Access and Launch permissions for All users inclusing
> IUSR_<machine name>
> and INTERACTIVE (and Everyone for that matter) but still I get
>
> Error Type:
> Server object, ASP 0178 (0x80070005)
> The call to Server.CreateObject failed while checking
> permissions. Access
> is denied to this object.
> /cosmic_local/Default.asp, line 45
>
>
> Any help would be appreciated
> -Brad
>
Message #3 by "Adrian Forbes" <adrian.forbes@n...> on Mon, 9 Dec 2002 14:19:31 -0000
> You said you've given "Access and Launch" permissions for All users,
> do you mean "Read & execute" when you check the file's
> properties > Security ?

dcomcnfg is a util that lets you set permissions for dcom, one of which 
is the "Access" permission and one is the "Launch" permission.

Message #4 by "Adrian Forbes" <adrian.forbes@n...> on Mon, 9 Dec 2002 14:21:17 -0000
Have you tried just CreateObject on its own?  i.e

set obj = CreateObject("PROGID")

instead of

set obj = Server.CreateObject("PROGID")

The reason being that using Server.CreateObject causes the built-in ASP
objects (Server, Session etc) to be marshalled which might be the real cause
of the problem.

-----Original Message-----
From: Brad Urani [mailto:bradurani@y...]
Sent: Sunday, December 08, 2002 8:26 PM
To: ASP components
Subject: [asp_components] Access Denied Error Question


I've created a DLL on my W2K Professional development machine in vb that
I'm trying to access via ASP. I've registered the DLL with the system and
I know it works, because I can access it from another VB program, but when
I try to access it with Server.CreateObject() from an ASP page I get an
Access denied error. I've already run the DCOMCNFG utilitiy and allowed
Access and Launch permissions for All users inclusing IUSR_<machine name>
and INTERACTIVE (and Everyone for that matter) but still I get

Error Type:
Server object, ASP 0178 (0x80070005)
The call to Server.CreateObject failed while checking permissions. Access
is denied to this object.
/cosmic_local/Default.asp, line 45


Any help would be appreciated
-Brad

%%email.unsub%%


Message #5 by "SEAK, Teng-Fong" <tfseak@f...> on Mon, 9 Dec 2002 15:39:53 +0100
	Personally, when I set permission, I would just use "Properties"
from context menu.  That should be enough.

> -----Message d'origine-----
> De : Adrian Forbes [mailto:adrian.forbes@n...]
> Envoy=C3=A9 : lundi 9 d=C3=A9cembre 2002 15:20
> =C3=80 : ASP components
> Objet : [asp_components] RE: Access Denied Error Question
>
>
> > You said you've given "Access and Launch" permissions for All 
users,
> > do you mean "Read & execute" when you check the file's
> > properties > Security ?
>
> dcomcnfg is a util that lets you set permissions for dcom,
> one of which is the "Access" permission and one is the
> "Launch" permission.
Message #6 by "SEAK, Teng-Fong" <tfseak@f...> on Mon, 9 Dec 2002 15:53:57 +0100
	In theory, they should have the same effect.  The only difference is
that CreateObject uses the scripting engine's native function (VBScript
engine's function in this case) to create COM objects; whereas
Server.CreateObject uses ASP's built-in Server object's method (as 
you've
written), thus the object is instantiated within ASP's engine.

> -----Message d'origine-----
> De : Adrian Forbes [mailto:adrian.forbes@n...]
> Envoy=C3=A9 : lundi 9 d=C3=A9cembre 2002 15:21
> =C3=80 : ASP components
> Objet : [asp_components] RE: Access Denied Error Question
>
>
> Have you tried just CreateObject on its own?  i.e
>
> set obj =3D CreateObject("PROGID")
>
> instead of
>
> set obj =3D Server.CreateObject("PROGID")
>
> The reason being that using Server.CreateObject causes the
> built-in ASP
> objects (Server, Session etc) to be marshalled which might be
> the real cause of the problem.
>
Message #7 by "Adrian Forbes" <adrian.forbes@n...> on Mon, 9 Dec 2002 15:45:06 -0000
When you create an object using Server.CreateObject then that object can 
access the in-built ASP objects using code like this;

set objSession =3D GetObjectContext.Item("Session")

To allow this ability the built-in objects have their interfaces 
marshelled across machines to the machine your component is actually 
running on.

-----Original Message-----
From: SEAK, Teng-Fong [mailto:tfseak@f...]
Sent: Monday, December 09, 2002 2:54 PM
To: ASP components
Subject: [asp_components] RE: Access Denied Error Question


	In theory, they should have the same effect.  The only difference is
that CreateObject uses the scripting engine's native function (VBScript
engine's function in this case) to create COM objects; whereas
Server.CreateObject uses ASP's built-in Server object's method (as 
you've
written), thus the object is instantiated within ASP's engine.

> -----Message d'origine-----
> De : Adrian Forbes [mailto:adrian.forbes@n...]
> Envoy=C3=A9 : lundi 9 d=C3=A9cembre 2002 15:21
> =C3=80 : ASP components
> Objet : [asp_components] RE: Access Denied Error Question
>
>
> Have you tried just CreateObject on its own?  i.e
>
> set obj =3D CreateObject("PROGID")
>
> instead of
>
> set obj =3D Server.CreateObject("PROGID")
>
> The reason being that using Server.CreateObject causes the
> built-in ASP
> objects (Server, Session etc) to be marshalled which might be
> the real cause of the problem.
>


adrian.forbes@n...
%%email.unsub%%


Message #8 by "SEAK, Teng-Fong" <tfseak@f...> on Mon, 16 Dec 2002 18:57:28 +0100
	I've never used this method, but what has it to do with what I had
written before?  Did you imply that if we use CreateObject, this method
can't work whereas with Server.CreateObject, this can work ?

> -----Message d'origine-----
> De : Adrian Forbes [mailto:adrian.forbes@n...]
> Envoy=C3=A9 : lundi 9 d=C3=A9cembre 2002 16:45
> =C3=80 : ASP components
> Objet : [asp_components] RE: Access Denied Error Question
>
>
> When you create an object using Server.CreateObject then that
> object can access the in-built ASP objects using code like this;
>
> set objSession =3D GetObjectContext.Item("Session")
>
> To allow this ability the built-in objects have their
> interfaces marshelled across machines to the machine your
> component is actually running on.
>
> -----Original Message-----
> From: SEAK, Teng-Fong [mailto:tfseak@f...]
> Sent: Monday, December 09, 2002 2:54 PM
> To: ASP components
> Subject: [asp_components] RE: Access Denied Error Question
>
>
> 	In theory, they should have the same effect.  The only
> difference is
> that CreateObject uses the scripting engine's native function
> (VBScript
> engine's function in this case) to create COM objects; whereas
> Server.CreateObject uses ASP's built-in Server object's
> method (as you've
> written), thus the object is instantiated within ASP's engine.
>
Message #9 by "Adrian Forbes" <adrian.forbes@n...> on Tue, 17 Dec 2002 18:48:41 -0000
>	I've never used this method, but what has it to do with what I had
> written before?

You were claiming that the only difference is "that CreateObject uses 
the scripting engine's native function (VBScript engine's function in 
this case) to create COM objects; whereas Server.CreateObject uses ASP's 
built-in Server object's method".  I was just pointing out that there 
are more differences than that.

>  Did you imply that if we use CreateObject, this method
> can't work whereas with Server.CreateObject, this can work ?

Unless they've changed it with IIS5, but that is how it worked under 
IIS4.



  Return to Index