469,287 Members | 2,357 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,287 developers. It's quick & easy.

Calling a Visual Basic Component Subroutine from ASP

Not sure if this is the right group for this but anyways...

I've got an ASP web application that uses a Visual Basic component to do
some work. I instantiate the component in asp and then attempt to call the
subroutine. The subroutine is actually invoked maybe 2 out of 10 times run.
What could possibly be the reason for this?? Why the inconsistency in
running the subroutine?

Cheers
Jul 19 '05 #1
4 4718
Do you have On Error Resume Next in the ASP?
Is the VB routine throwing an error.
Is the VB DLL compiled as 'Apartment Threaded' and 'Unattended Execution'?

How do you know that the routine is not being called? Have you run the DLL
in debug mode?

Chris.

"Michael Farber" <mf*****@iiac.com> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
Not sure if this is the right group for this but anyways...

I've got an ASP web application that uses a Visual Basic component to do
some work. I instantiate the component in asp and then attempt to call the subroutine. The subroutine is actually invoked maybe 2 out of 10 times run. What could possibly be the reason for this?? Why the inconsistency in
running the subroutine?

Cheers

Jul 19 '05 #2
Hi, thanks for the reply.

1. ASP does have On Error Resume Next. I have disabled this to see what
happens. Nothing happens.
2. No errors are being thrown in VB
3. Apartment threaded

I have the component running in the VB debugger and breakpoints in the
subroutine are not being trapped. Breakpoints in other routines are
consistently trapped.

After a bunch of tries, the breakpoint is trapped and the subroutine runs as
it should. Very wierd.


"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:el**************@TK2MSFTNGP12.phx.gbl...
Do you have On Error Resume Next in the ASP?
Is the VB routine throwing an error.
Is the VB DLL compiled as 'Apartment Threaded' and 'Unattended Execution'?

How do you know that the routine is not being called? Have you run the DLL
in debug mode?

Chris.

"Michael Farber" <mf*****@iiac.com> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
Not sure if this is the right group for this but anyways...

I've got an ASP web application that uses a Visual Basic component to do
some work. I instantiate the component in asp and then attempt to call

the
subroutine. The subroutine is actually invoked maybe 2 out of 10 times

run.
What could possibly be the reason for this?? Why the inconsistency in
running the subroutine?

Cheers


Jul 19 '05 #3
Are you certain that the call is being made (eg. run the web ASP code in
debug as well)?
Maybe its in an IF statement that is not being entered or you have a url
misnamed?

I've *never* come across an ASP page calling a VB routine that does not at
least attempt the call and either throw an error in the ASP or in the VB.

Chris.
"Michael Farber" <mf*****@iiac.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
Hi, thanks for the reply.

1. ASP does have On Error Resume Next. I have disabled this to see what
happens. Nothing happens.
2. No errors are being thrown in VB
3. Apartment threaded

I have the component running in the VB debugger and breakpoints in the
subroutine are not being trapped. Breakpoints in other routines are
consistently trapped.

After a bunch of tries, the breakpoint is trapped and the subroutine runs as it should. Very wierd.


"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:el**************@TK2MSFTNGP12.phx.gbl...
Do you have On Error Resume Next in the ASP?
Is the VB routine throwing an error.
Is the VB DLL compiled as 'Apartment Threaded' and 'Unattended Execution'?
How do you know that the routine is not being called? Have you run the DLL in debug mode?

Chris.

"Michael Farber" <mf*****@iiac.com> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
Not sure if this is the right group for this but anyways...

I've got an ASP web application that uses a Visual Basic component to do some work. I instantiate the component in asp and then attempt to
call the
subroutine. The subroutine is actually invoked maybe 2 out of 10
times run.
What could possibly be the reason for this?? Why the inconsistency in
running the subroutine?

Cheers



Jul 19 '05 #4
In article <el**************@TK2MSFTNGP12.phx.gbl>, chris@blue-
canoe.co.uk.NOSPAM says...
Do you have On Error Resume Next in the ASP?
Is the VB routine throwing an error.
Is the VB DLL compiled as 'Apartment Threaded' and 'Unattended Execution'?

How do you know that the routine is not being called? Have you run the DLL
in debug mode?

Chris.

"Michael Farber" <mf*****@iiac.com> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
Not sure if this is the right group for this but anyways...

I've got an ASP web application that uses a Visual Basic component to do
some work. I instantiate the component in asp and then attempt to call

the
subroutine. The subroutine is actually invoked maybe 2 out of 10 times

run.
What could possibly be the reason for this?? Why the inconsistency in
running the subroutine?


Just a thought. You mention that you are running the code in VB debug
mode to test it. Is it possible you have the compiled DLL in memory as
well at the same time? Make sure you unregister the DLL (assuming you
are not using COM+) and reboot.

--

Remove NOT from email address to reply. AntiSpam in action.
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

54 posts views Thread by seberino | last post: by
12 posts views Thread by Bigdakine | last post: by
5 posts views Thread by Amit | last post: by
11 posts views Thread by RichN | last post: by
3 posts views Thread by Alpesh Parmar | last post: by
9 posts views Thread by Terry | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.