Accessing VB DLL (COM) from ASP


C

Chris

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
 
Ad

Advertisements

J

Jeff Dillon

Chris said:
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
 
Ad

Advertisements

D

Daniel Crichton

Chris wrote on Tue, 4 Nov 2008 09:54:29 -0800 (PST):
I am a newbie learning COM. I used the below sample to build a
prototype.

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?


<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.
 

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

Top