Groups | Blog | Home
all groups > inetserver asp components > august 2003 >

inetserver asp components : Accessing VJ++ COM DLL From ASP Page gives error


Surya
8/18/2003 10:05:10 PM
Hi Friends,
I had written a VJ++ COM DLL which uses some jar files.I tried to
access the DLL from a VB Standard Exe
and it worked fine.But,when i did the same with a ASP Page it gave an error
No Class Def Found.The Jar Files
which the COM DLL needs where in the proper classpath when the DLL was
built.Also ,VB Standard Exe was also
executed from the Same machine.The ASP Page is also in the IIS Server on the
same machine.But,i do not understand
why it works with VB and not with ASP the same way.Is there any specific way
to refer to jar files or class files which
a VJ++ COM DLL may require while working with ASP and IIS.If anyone knows a
solution or has has faced a similar
problem in the past,please let me know.Any help regarding this will be
sincerly appreciated.

Adrian Forbes - MVP
8/19/2003 3:29:43 AM
[quoted text, click to view]

ASP/VBScript can only use late-binding and the IDispatch
interface. In your VB EXE are you using early binding?
Create a text file on your desktop called test.vbs and
enter into it;

set objMyObject = CreateObject("ProgID")
msgbox objMyObject is nothing
set objMyObject = nothing

Save the file and double-click it. If all is well you
will get a message box saying "False". Or do you get an
Adrian Forbes - MVP
8/19/2003 9:04:47 AM
Is your site using anon access? Try logging in locally as
your anonymous IIS account and running the VBS test script
and see if it still works.

To log in as the anon user right-click your Default Web in
the IIS config util and select properties then the
Directory Security tab. In the Anonymous access box (top
one) click the Edit button.

This will give you the Authentication Methods box, click
Edit in the top one (anonymous access).

The anon user account dialogue has two fields. The top
one is the account IIS uses for anon access but it has a
random password. The account should be IUS_<machine
name>. Change the password for this user via the normal
admin tools, then uncheck "Allow IIS to control password"
and enter the password you changed the account to.

Now log off and log in using your IUSR account and the
password and try your script. When your testing is done,
go back to the anon account properties and reselect "Allow
IIS to control password"

[quoted text, click to view]
Surya
8/19/2003 5:22:50 PM
Hi Adrian,
Thanks for your immediate response.It works fine as a vbscript
file,meaning i get a false..But,does not work in a ASP Page.What is that i
have
to do so that it works in ASP.

[quoted text, click to view]

AddThis Social Bookmark Button