can an asp page call a .NET DLL that...

J

Joe Van Meer

Hi ng,

Can an Asp page call a function in a .NET dll?

I have a set of asp pages that need to call a .NET DLL that does a Digital
Signature XML to an xml doc.

I have tested my DLL with a windows form app that calls the same function in
question and it works as it should.

When I call the same method via my asp page COM object I get the object no
problem, as well as the method, but all it does is return an empty string
even though I have it returning mydocxml.outerxml.toString();

I can call a second test method no problem that returns a string and that
gets to the form where I need it. But the function I reallly need it to work
doesnt return the string via the interop method, but does via my windows
form app.

My routine includes using regasm.exe , the putting the dll in the gac,
iisreset then test the page. Still no return string.

Could this be permission related or am I screwing this up another way? Like
my code in the dll deals with X509Certificate2 objects and cryptography...am
I overlooking something?

Cheers & thanks :)
 
J

Joe Van Meer

P.S.

I also have all my methods decalred as public, a class interface, guids for
my class and interface, and com visible attribute on my methods .

cheers
 
P

Pavel Minaev

Can an Asp page call a function in a .NET dll?

I have a set of asp pages that need to call a .NET DLL that does a Digital
Signature XML to an xml doc.

I have tested my DLL with a windows form app that calls the same functionin
question and it works as it should.

When I call the same method via my asp page COM object I get the object no
problem, as well as the method, but all it does is return an empty string
even though I have it returning mydocxml.outerxml.toString();

I can call a second test method no problem that returns a string and that
gets to the form where I need it. But the function I reallly need it to work
doesnt return the string via the interop method, but does via my windows
form app.

My routine includes using regasm.exe , the putting the dll in the gac,
iisreset then test the page. Still no return string.

It's hard to say without looking at the signatures of your COM-visible
methods. Your WinForms test doesn't help much there as (if I
understand correctly) you're just calling it directly - i.e. .NET-
to-.NET - and not via COM interop, as is the way it works from ASP.
 
J

Joe Van Meer

HI thx Pavel,

It turns out that my certificate was stored in the wrong spot in my store on
server and my code wasn;t locating it.

Store.LocalMachine was where it should have been installed in the root, but
it was sent to another spot!

cheers & thanks for replying man, joe :p



Can an Asp page call a function in a .NET dll?

I have a set of asp pages that need to call a .NET DLL that does a Digital
Signature XML to an xml doc.

I have tested my DLL with a windows form app that calls the same function
in
question and it works as it should.

When I call the same method via my asp page COM object I get the object no
problem, as well as the method, but all it does is return an empty string
even though I have it returning mydocxml.outerxml.toString();

I can call a second test method no problem that returns a string and that
gets to the form where I need it. But the function I reallly need it to
work
doesnt return the string via the interop method, but does via my windows
form app.

My routine includes using regasm.exe , the putting the dll in the gac,
iisreset then test the page. Still no return string.

It's hard to say without looking at the signatures of your COM-visible
methods. Your WinForms test doesn't help much there as (if I
understand correctly) you're just calling it directly - i.e. .NET-
to-.NET - and not via COM interop, as is the way it works from ASP.
 

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