Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Denied

Status
Not open for further replies.

karenmierkalns

Programmer
May 10, 2001
54
CA
I'm very new to ASP, and am still learning. I have created a Visual Basic ActiveX DLL, and I know that it works, because I tested it using VB.

How do you go about using it for ASP? I am using MS Visual InterDev. I have tried inserting it (the compiled DLL file) into the project (I am using IIS), and published it. I keep getting an error that says I have been denied permission:

Server object, ASP 0178 (0x80070005)
The call to Server.CreateObject failed while checking permissions. Access is denied to this object.

The only ASP code I have is:

dim login
set login = server.CreateObject("aspTest.clsLogin")

where aspTest.clsLogin is the class I have used. I used this syntax with the test VB app.

I followed an example I found, but I don't see where the access to the reference/component is first used.

Also, I referred to Microsoft's article:

and it suggests I stop the recompile the ActiveX DLL, then restart the service, and try again..but it didn't help. Should I have the dll within the project, or is that necessary? (I would think it would be necessary once I put it on a remote server?)

Also, I tried to add the reference to my project, and this line was added to the global.asa:

<!--METADATA TYPE=&quot;TypeLib&quot; NAME=&quot;aspTest&quot; UUID=&quot;{596F2603-957E-45FF-9801-ED9BCBD4D1C3}&quot; VERSION=&quot;1.0&quot;-->

but it says it cannot load the type library, once I try to run it.


This is probably a basic concept, but I am new at this. Any tips would be helpful.

Thanks, - Karen
 
hey,

register your dll on the server. Then in the ASP you need to have some server code that instantiates the object. If your server side code is in VBSript, you can:

<%
dim oMyObject
set oMyObject = server.createobject(&quot;MyDLL.MyClass&quot;)
oMyObject.CallMemberFunctionHere
%>

and then you can use the object.
my syntax may be a little off, since I haven't been using this lately, but hopefully you get the idea.
 
Sorry - I should mention I was able to fix this *very* easily.

For all the dlls you will be using (even if the dll you are referencing in the code is referring to another one that you are not referencing in code) and databases..all that stuff you will be creating objects out of: add either &quot;everyone&quot; as a user to the file (this is used loosely for quickness), and give the user full control; or add both: Interactive user and IUSR_<system> user, and give both full control.

This solved *all* my problems with access denied using IIS. Thanks for all the input. The only inconvenience is that you have to add it for all the files...so that's why I just added the user &quot;everyone&quot; so it's quicker.
- Karen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top