DLL from ASP

Discussion in 'ASP General' started by verb13@hotmail.com, Oct 20, 2005.

  1. Guest

    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?
     
    , Oct 20, 2005
    #1
    1. Advertising

  2. Steven Burn Guest

    http://aspfaq.com/show.asp?id=2134

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    <> wrote in message
    news:...
    > 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?
    >
     
    Steven Burn, Oct 20, 2005
    #2
    1. Advertising

  3. Someone Guest

    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.


    <> wrote in message
    news:...
    >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?
    >
     
    Someone, Oct 20, 2005
    #3
  4. Guest

    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
     
    , Oct 20, 2005
    #4
  5. Someone Guest

    > 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




    <> wrote in message
    news:...
    > 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
    >
     
    Someone, Oct 21, 2005
    #5
  6. Guest

    I gave Everyone Full Control to my dll, msvbvm60.dll, C:\WINDOWS\Temp,
    but the result is the same.
     
    , Oct 21, 2005
    #6
  7. Someone Guest

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


    <> wrote in message
    news:...
    >I gave Everyone Full Control to my dll, msvbvm60.dll, C:\WINDOWS\Temp,
    > but the result is the same.
    >
     
    Someone, Oct 21, 2005
    #7
  8. Someone Guest

    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


    <> wrote in message
    news:...
    > 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
    >
     
    Someone, Oct 21, 2005
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,882
  2. Weston Fryatt
    Replies:
    2
    Views:
    1,003
    Weston Fryatt
    Jan 1, 2005
  3. NGM
    Replies:
    0
    Views:
    2,335
  4. Dave
    Replies:
    0
    Views:
    123
  5. H. Simpson
    Replies:
    4
    Views:
    311
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page