Accessing VB DLL (COM) from ASP

Discussion in 'ASP General' started by Chris, Nov 4, 2008.

  1. Chris

    Chris Guest

    Hello,

    I am a newbie learning COM. I used the below sample to build a
    prototype.

    http://www.stardeveloper.com/articles/display.html?article=2000041001&page=1

    I was able to create the .dll using VB6. The .dll wasn't automatically
    registered as I am using OS - Vista. I registered the .dll manually
    using regsvr32 command.

    After registering, when I tried to use it in ASP application using the
    below code, and it gave me an error. The error was on the line "Set sd
    = Server.CreateObject("Stardeveloper.Author")"

    I tried googling around, but did not find any solution. Am I missing
    something?


    Code:
    ---------

    <html>
    <head>
    </head>
    <body>
    <%
    ' Declaring variable
    Dim sd
    ' Creating instance of our Component
    Set sd = Server.CreateObject("Stardeveloper.Author")
    Response.Write "Name of author is : " & sd.Author
    Set sd = Nothing
    %>


    Error:
    --------
    An error occurred on the server when processing the URL. Please
    contact the system administrator


    Thank you!

    Christina
    Chris, Nov 4, 2008
    #1
    1. Advertising

  2. Chris

    Jeff Dillon Guest

    "Chris" <> wrote in message
    news:...
    > Hello,
    >
    > I am a newbie learning COM. I used the below sample to build a
    > prototype.
    >
    > http://www.stardeveloper.com/articles/display.html?article=2000041001&page=1
    >
    > I was able to create the .dll using VB6. The .dll wasn't automatically
    > registered as I am using OS - Vista. I registered the .dll manually
    > using regsvr32 command.
    >
    > After registering, when I tried to use it in ASP application using the
    > below code, and it gave me an error. The error was on the line "Set sd
    > = Server.CreateObject("Stardeveloper.Author")"
    >
    > I tried googling around, but did not find any solution. Am I missing
    > something?
    >
    >
    > Code:
    > ---------
    >
    > <html>
    > <head>
    > </head>
    > <body>
    > <%
    > ' Declaring variable
    > Dim sd
    > ' Creating instance of our Component
    > Set sd = Server.CreateObject("Stardeveloper.Author")
    > Response.Write "Name of author is : " & sd.Author
    > Set sd = Nothing
    > %>
    >
    >
    > Error:
    > --------
    > An error occurred on the server when processing the URL. Please
    > contact the system administrator
    >
    >
    > Thank you!
    >
    > Christina
    >


    Can you make a CreateObject call from another VB6 application? One way to
    test outside of ASP
    Jeff Dillon, Nov 5, 2008
    #2
    1. Advertising

  3. Chris wrote on Tue, 4 Nov 2008 09:54:29 -0800 (PST):

    > Hello,


    > I am a newbie learning COM. I used the below sample to build a
    > prototype.


    > http://www.stardeveloper.com/articles/display.html?article=2000041001&
    > page=1


    > I was able to create the .dll using VB6. The .dll wasn't automatically
    > registered as I am using OS - Vista. I registered the .dll manually
    > using regsvr32 command.


    > After registering, when I tried to use it in ASP application using the
    > below code, and it gave me an error. The error was on the line "Set sd
    > = Server.CreateObject("Stardeveloper.Author")"


    > I tried googling around, but did not find any solution. Am I missing
    > something?



    > Code:
    > ---------


    > <html>
    > <head>
    > </head>
    > <body>
    > <%
    > ' Declaring variable
    > Dim sd ' Creating instance of our Component
    > Set sd = Server.CreateObject("Stardeveloper.Author")
    > Response.Write "Name of author is : " & sd.Author
    > Set sd = Nothing %>



    > Error:
    > --------
    > An error occurred on the server when processing the URL. Please contact
    > the system administrator



    > Thank you!


    > Christina



    You need to get the actual error code from the server - it looks like the
    server has a "friendly" error message handler which is useless for
    debugging.

    First thing I'd check is that you have given execute permission for the DLL
    to the user account that IIS is running under, and also the appropriate
    permissions to any other files that your DLL relies upon.

    --
    Dan
    Daniel Crichton, Nov 6, 2008
    #3
    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,637
  2. Will
    Replies:
    1
    Views:
    361
    Natty Gur
    Aug 13, 2003
  3. NGM
    Replies:
    0
    Views:
    2,290
  4. Dave
    Replies:
    0
    Views:
    101
  5. H. Simpson
    Replies:
    4
    Views:
    248
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page