|
 |
asp_components thread: COM & HTM
Message #1 by "Louise Greally" <lgreally@c...> on Thu, 15 Nov 2001 13:55:02 -0000
|
|
Hi
My question is really related to com and htm/javascript, since the book
is for asp I'll ask the question here, as Im not sure exactly where else
to post this.
I recently developed the com object from chapter 2 of beginning
components for asp WX2882, but when I use the object tag in a htm file
to reference a dll, how can I use this in a client/server environment.
Firstly I registered the dll on the server, then realised that calling
it from a server it would load onto a client machine and that it would
have to be installed on the client machine, I have the object id,
classid, and codebase all entered correctly yet the I kepp getting a js
error- object doesnt support method or property- what am I doing wrong??
any ideas welcome
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Louise Greally, Software Developer- CompuPharma Ltd.
20B Beckett Way, Park West Business Park, Dublin 12, Ireland.
375 Passaic Ave, Fairfield, New Jersey 07004, USA.
P: +xxx-x-xxx-xxxx F: +xxx-x-xxx-xxxx
Web: <www.compupharma.net>
Email: lgreally@c...
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Message #2 by "Bruce J. Pezzlo" <bpezzlo@p...> on Thu, 15 Nov 2001 09:25:52 -0500
|
|
You have IIS running as your web server. What you would like is for the
dll to be run on the web server, not the client computers. To
facilitate this, you need a page that will have some server side
processing inside it. Htm/html files by default don't offer any server
side processing. Name you page with the .asp extension, to let IIS know
that it should pre-process the page before streaming the page requested
to the client. Inside the asp page, any code you want the server to
look at should be wrapped inside percent tags like this:
<BR/>
This is not processed
streamed directly to client
<BR/>
<!-- begin asp code -->
<%
' <--- notice less than & percent sign
' this queues asp to react
' embedded code
' iis will look at
' and process before
' it streams to client
Dim objMyObject
Set objMyObject =3D CreateObject("someobject.someclass")
Response.Write objMyObject.SomeMethod (input)
Response.Write "<BR/>"
Response.Write objMyObject.SomeProperty
Response.Write "<BR/>"
Set objMyObject =3D Nothing
' <--- notice percent sign & greater than sign
' this queues asp that this marks end of code segment
%>
<!-- end asp code -->
You can have multiple tags like this in your asp page.
The dll will run on the web server and does not need to be installed on
client boxes.
I suggest you look into using MTS (Microsoft Transaction Server) if you
are going to be writing dll's for use by web server. But that is a
whole other topic, which won't effect your asp code ...
Bruce
---
Bruce Pezzlo
MCSD & MCDBA
President
PLUM Computer Consulting, Inc.
(617) 266 - 1942 x201
Fax: (617) 267 - 0895
bpezzlo@p...
-----Original Message-----
From: Louise Greally [mailto:lgreally@c...]
Sent: Thursday, November 15, 2001 8:55 AM
To: ASP components
Subject: [asp_components] COM & HTM
Hi
My question is really related to com and htm/javascript, since the book
is for asp I'll ask the question here, as Im not sure exactly where else
to post this.
I recently developed the com object from chapter 2 of beginning
components for asp WX2882, but when I use the object tag in a htm file
to reference a dll, how can I use this in a client/server environment.
Firstly I registered the dll on the server, then realised that calling
it from a server it would load onto a client machine and that it would
have to be installed on the client machine, I have the object id,
classid, and codebase all entered correctly yet the I kepp getting a js
error- object doesnt support method or property- what am I doing wrong??
any ideas welcome
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Louise Greally, Software Developer- CompuPharma Ltd.
20B Beckett Way, Park West Business Park, Dublin 12, Ireland.
375 Passaic Ave, Fairfield, New Jersey 07004, USA.
P: +xxx-x-xxx-xxxx F: +xxx-x-xxx-xxxx
Web: <www.compupharma.net>
Email: lgreally@c...
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
$subst('Email.Unsub')
Message #3 by "Louise" <lgreally@c...> on Thu, 15 Nov 2001 14:56:24
|
|
Hi
Thanks for your answer but unfortunately I wish to call it from
javascript/htm if possible, I have it working through asp in another app,
but am interested to see if it would work on a client/server machine
without IIS and therefore reduce the requirements of the app (i.e.
customers wouldnt need IIS)
---------------------------------------------
> You have IIS running as your web server. What you would like is for the
> dll to be run on the web server, not the client computers. To
> facilitate this, you need a page that will have some server side
> processing inside it. Htm/html files by default don't offer any server
> side processing. Name you page with the .asp extension, to let IIS know
> that it should pre-process the page before streaming the page requested
> to the client. Inside the asp page, any code you want the server to
> look at should be wrapped inside percent tags like this:
>
> <BR/>
> This is not processed
> streamed directly to client
> <BR/>
> <!-- begin asp code -->
> <%
> ' <--- notice less than & percent sign
> ' this queues asp to react
> ' embedded code
> ' iis will look at
> ' and process before
> ' it streams to client
> Dim objMyObject
> Set objMyObject =3D CreateObject("someobject.someclass")
> Response.Write objMyObject.SomeMethod (input)
> Response.Write "<BR/>"
> Response.Write objMyObject.SomeProperty
> Response.Write "<BR/>"
> Set objMyObject =3D Nothing
> ' <--- notice percent sign & greater than sign
> ' this queues asp that this marks end of code segment
> %>
> <!-- end asp code -->
>
> You can have multiple tags like this in your asp page.
> The dll will run on the web server and does not need to be installed on
> client boxes.
>
> I suggest you look into using MTS (Microsoft Transaction Server) if you
> are going to be writing dll's for use by web server. But that is a
> whole other topic, which won't effect your asp code ...
>
> Bruce
>
>
> ---
> Bruce Pezzlo
> MCSD & MCDBA
> President
> PLUM Computer Consulting, Inc.
> (617) 266 - 1942 x201
> Fax: (617) 267 - 0895
> bpezzlo@p...
>
>
Message #4 by Kyle Burns <kburns@c...> on Thu, 15 Nov 2001 11:19:09 -0500
|
|
Try posting the code. We'll take a look.
=================================
Kyle M. Burns, MCSD, MCT
ECommerce Technology Manager
Centra Credit Union
kburns@c...
-----Original Message-----
From: Louise [mailto:lgreally@c...]
Sent: Thursday, November 15, 2001 9:56 AM
To: ASP components
Subject: [asp_components] RE: COM & HTM
Hi
Thanks for your answer but unfortunately I wish to call it from
javascript/htm if possible, I have it working through asp in another app,
but am interested to see if it would work on a client/server machine
without IIS and therefore reduce the requirements of the app (i.e.
customers wouldnt need IIS)
---------------------------------------------
> You have IIS running as your web server. What you would like is for the
> dll to be run on the web server, not the client computers. To
> facilitate this, you need a page that will have some server side
> processing inside it. Htm/html files by default don't offer any server
> side processing. Name you page with the .asp extension, to let IIS know
> that it should pre-process the page before streaming the page requested
> to the client. Inside the asp page, any code you want the server to
> look at should be wrapped inside percent tags like this:
>
> <BR/>
> This is not processed
> streamed directly to client
> <BR/>
> <!-- begin asp code -->
> <%
> ' <--- notice less than & percent sign
> ' this queues asp to react
> ' embedded code
> ' iis will look at
> ' and process before
> ' it streams to client
> Dim objMyObject
> Set objMyObject =3D CreateObject("someobject.someclass")
> Response.Write objMyObject.SomeMethod (input)
> Response.Write "<BR/>"
> Response.Write objMyObject.SomeProperty
> Response.Write "<BR/>"
> Set objMyObject =3D Nothing
> ' <--- notice percent sign & greater than sign
> ' this queues asp that this marks end of code segment
> %>
> <!-- end asp code -->
>
> You can have multiple tags like this in your asp page.
> The dll will run on the web server and does not need to be installed on
> client boxes.
>
> I suggest you look into using MTS (Microsoft Transaction Server) if you
> are going to be writing dll's for use by web server. But that is a
> whole other topic, which won't effect your asp code ...
>
> Bruce
>
>
> ---
> Bruce Pezzlo
> MCSD & MCDBA
> President
> PLUM Computer Consulting, Inc.
> (617) 266 - 1942 x201
> Fax: (617) 267 - 0895
> bpezzlo@p...
>
>
$subst('Email.Unsub')
Message #5 by "Louise" <lgreally@c...> on Thu, 15 Nov 2001 16:53:27
|
|
Hi
Thanks for your reply
2 ways ive tried it
First way with a cab file, code is
<OBJECT ID="WX2882db5"
CLASSID="CLSID:3ED9D65A-E79B-4535-AD3E-CAD6D3CD3E3C"
CODEBASE="WX2882db5.CAB#version=1,0,0,0">
</OBJECT>
var dblPremium = WX2882db5.GetPremium();
2nd way
<OBJECT ID="WX2882db5" CLASSID="CLSID:3ED9D65A-E79B-4535-AD3E-CAD6D3CD3E3C"
CODEBASE="D:\com\WX2882db5.dll">
</OBJECT>
var dblPremium = WX2882db5.GetPremium();
when I run these from the server machine locally, or copy them to my own
machine and run locally they're fine, however when I run them on the
client both ways , even if I register the dll on both, I get the same
error- object doesnt support this method or property.
I know its probably something simple, but I just cant get it to work.
Message #6 by Oleg Kapeljushnik <c-oleg.kapeljushnik@w...> on Thu, 15 Nov 2001 12:45:19 -0500
|
|
Hi !
As far as I know if you want to use some object on client machine it should
be installed there.
Now first case I don't think its goanna work unless WX2882db5 object will
exists on remote client machine.
Second case, you should try to change CODEBASE="D:\com\WX2882db5.dll"
to something like CODEBASE="http://your server"
cause when you say "D:\com\WX2882db5.dll" it will try to find it out on
local client
computer and not on your server.
Hope it will help.
Oleg
-----Original Message-----
From: Louise [mailto:lgreally@c...]
Sent: November 15, 2001 4:53 PM
To: ASP components
Subject: [asp_components] RE: COM & HTM
Hi
Thanks for your reply
2 ways ive tried it
First way with a cab file, code is
<OBJECT ID="WX2882db5"
CLASSID="CLSID:3ED9D65A-E79B-4535-AD3E-CAD6D3CD3E3C"
CODEBASE="WX2882db5.CAB#version=1,0,0,0">
</OBJECT>
var dblPremium = WX2882db5.GetPremium();
2nd way
<OBJECT ID="WX2882db5" CLASSID="CLSID:3ED9D65A-E79B-4535-AD3E-CAD6D3CD3E3C"
CODEBASE="D:\com\WX2882db5.dll">
</OBJECT>
var dblPremium = WX2882db5.GetPremium();
when I run these from the server machine locally, or copy them to my own
machine and run locally they're fine, however when I run them on the
client both ways , even if I register the dll on both, I get the same
error- object doesnt support this method or property.
I know its probably something simple, but I just cant get it to work.
c-oleg.kapeljushnik@w...
$subst('Email.Unsub')
Message #7 by "Louise" <lgreally@c...> on Fri, 16 Nov 2001 11:28:06
|
|
Thanks alot for your comment I changed the codebase to
CODEBASE="http://myserver" and enabled activeX conrols to prompt for
activeX controls not marked as safe, it now works perfectly!!
On another note is there anyway a dll could pass out info to the server,
as well the client browser without using asp??
Thanks again for your help
> Hi !
>
> As far as I know if you want to use some object on client machine it
should
> be installed there.
> Now first case I don't think its goanna work unless WX2882db5 object will
> exists on remote client machine.
> Second case, you should try to change CODEBASE="D:\com\WX2882db5.dll"
> to something like CODEBASE="http://your server"
> cause when you say "D:\com\WX2882db5.dll" it will try to find it out on
> local client
> computer and not on your server.
>
> Hope it will help.
>
> Oleg
>
Message #8 by Oleg Kapeljushnik <c-oleg.kapeljushnik@w...> on Fri, 16 Nov 2001 08:40:42 -0500
|
|
Hi again !!
First of all there are always a way to do whatever you want to.
I never did it but may be you should think about using sockets in this case.
You'll have to build some small client program inside DLL that going to be
on
client machine and "server client" that going to reside on server machine
and talk with all your
clients, but you'll also have to consider multi-user environment, so you
"server client"
will know how to handle more than one user.
Oleg.
-----Original Message-----
From: Louise [mailto:lgreally@c...]
Sent: November 16, 2001 6:28 AM
To: ASP components
Subject: [asp_components] RE: COM & HTM
Thanks alot for your comment I changed the codebase to
CODEBASE="http://myserver" and enabled activeX conrols to prompt for
activeX controls not marked as safe, it now works perfectly!!
On another note is there anyway a dll could pass out info to the server,
as well the client browser without using asp??
Thanks again for your help
> Hi !
>
> As far as I know if you want to use some object on client machine it
should
> be installed there.
> Now first case I don't think its goanna work unless WX2882db5 object will
> exists on remote client machine.
> Second case, you should try to change CODEBASE="D:\com\WX2882db5.dll"
> to something like CODEBASE="http://your server"
> cause when you say "D:\com\WX2882db5.dll" it will try to find it out on
> local client
> computer and not on your server.
>
> Hope it will help.
>
> Oleg
>
c-oleg.kapeljushnik@w...
$subst('Email.Unsub')
|
|
 |