DLL from ASP

V

verb13

I created a simple dll. I am able to reference and use it from a vb
program, but not from an asp page. This code

Set o = Server.CreateObject("MyLib.MyClass")

gives me this error:

Server object, ASP 0177 (0x800401F3)
Invalid class string

I gave Full Control permission to Everyone to both my dll file and
msvbvm60.dll.
What is going wrong?
 
S

Someone

What's your DLL file name and what's the project name?

My guess is that your DLL name is MyLib.dll and you left the project name at
Project1. Try:

Set o = Server.CreateObject("Project1.MyClass")

You could start a new VB project and look in the list of references to see
how your classes are listed.
 
V

verb13

As I already mentioned, the dll works fine from a vb program.

This works in vb:
Set o = CreateObject("MyLib.MyClass")

This does not work in asp:
Set o = Server.CreateObject("MyLib.MyClass")

The error is:
Server object, ASP 0177 (0x800401F3)
Invalid class string
 
S

Someone

This works in vb:
Set o = CreateObject("MyLib.MyClass")

You didn't include this code fragment in your original post, so I assumed
that you added it as a reference, which works differently.


Make sure that you give the IWAM account enough permissions. Also make sure
that it has full permission to the TEMP folder(s).

How to set required NTFS permissions and user rights for an IIS 5.0 Web
server
http://support.microsoft.com/default.aspx?scid=kb;en-us;271071
 
V

verb13

I gave Everyone Full Control to my dll, msvbvm60.dll, C:\WINDOWS\Temp,
but the result is the same.
 
S

Someone

Try adding IWAM specifically, not Everyone group. You could add IUSR too,
but reduce its permission later after ruling out the needed permissions.
 
S

Someone

I am not sure if ASP uses the same logic or API function as CreateObject in
VB6. There maybe a conflict in the registry because of IDE crashes or not
using binary compatibility. Go to Project|References and see if your class
is listed more than once, if it is, then you definitely have a problem. Even
if it's listed once, you may find the suggestions in the following article
useful:

PRB: DCOMCNFG Reports Multiple Copies of DCOM Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;180525

Note that the article refers to using DCOMCNFG.EXE in Windows 9x. You can
see the same list of objects by going to Project|References. In newer
versions of Windows, you can see the list of objects in Control
Panel|Administrative Tools|Component Services|Computers|My Computer|DCOM
Config. Typing "DCOMCNFG.EXE" will open "Component Services". You might see
some warnings that some AppID's are not recorded, choose No.

When you run an ActiveX project in the IDE, VB6 creates registry entries and
points them to the following file:

C:\Program Files\Microsoft Visual Studio\VB98\VB6DEBUG.DLL

When you stop the project, the IDE would auto delete these entries, unless
it crashes. When you compile your ActiveX project, VB6 auto create the
registry entries for them and point them to your compiled file. VB6 never
delete these entries, otherwise you can't use your component.

Also, in NT, you have to be a member of Power Users or Administrators in
order to develop and test ActiveX projects. That's because only Power Users
and Administrators can write to HKEY_LOCAL_MACHINE.

INFO: Registry Entries Made by an ActiveX Component
http://support.microsoft.com/default.aspx?scid=kb;en-us;183771
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top