Connecting Tech Pros Worldwide Help | Site Map

Accessing VB DLL (COM) from ASP

Chris
Guest
 
Posts: n/a
#1: Nov 4 '08
Hello,

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

http://www.stardeveloper.com/article...0041001&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

Jeff Dillon
Guest
 
Posts: n/a
#2: Nov 5 '08

re: Accessing VB DLL (COM) from ASP


"Chris" <christhom0000@gmail.comwrote in message
news:352143d4-da8e-436c-aebc-7235a33c7fbb@w24g2000prd.googlegroups.com...
Quote:
Hello,
>
I am a newbie learning COM. I used the below sample to build a
prototype.
>
http://www.stardeveloper.com/article...0041001&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


Daniel Crichton
Guest
 
Posts: n/a
#3: Nov 6 '08

re: Accessing VB DLL (COM) from ASP


Chris wrote on Tue, 4 Nov 2008 09:54:29 -0800 (PST):
Quote:
Hello,
Quote:
I am a newbie learning COM. I used the below sample to build a
prototype.
Quote:
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.
Quote:
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")"
Quote:
I tried googling around, but did not find any solution. Am I missing
something?
Quote:
Code:
---------
Quote:
<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 %>
Quote:
Error:
--------
An error occurred on the server when processing the URL. Please contact
the system administrator
Quote:
Thank you!
Quote:
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


Closed Thread