Connecting Tech Pros Worldwide Help | Site Map

Calling a Visual Basic Component Subroutine from ASP

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 19th, 2005, 05:52 AM
Michael Farber
Guest
 
Posts: n/a
Default 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



  #2  
Old July 19th, 2005, 05:52 AM
Chris Barber
Guest
 
Posts: n/a
Default Re: Calling a Visual Basic Component Subroutine from ASP

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" <mfarber@iiac.com> wrote in message
news:OsqmloLTDHA.1320@TK2MSFTNGP12.phx.gbl...[color=blue]
> 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[/color]
the[color=blue]
> subroutine. The subroutine is actually invoked maybe 2 out of 10 times[/color]
run.[color=blue]
> What could possibly be the reason for this?? Why the inconsistency in
> running the subroutine?
>
> Cheers
>
>[/color]


  #3  
Old July 19th, 2005, 05:52 AM
Michael Farber
Guest
 
Posts: n/a
Default Re: Calling a Visual Basic Component Subroutine from ASP

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" <chris@blue-canoe.co.uk.NOSPAM> wrote in message
news:elyKRKMTDHA.2128@TK2MSFTNGP12.phx.gbl...[color=blue]
> 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" <mfarber@iiac.com> wrote in message
> news:OsqmloLTDHA.1320@TK2MSFTNGP12.phx.gbl...[color=green]
> > 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[/color]
> the[color=green]
> > subroutine. The subroutine is actually invoked maybe 2 out of 10 times[/color]
> run.[color=green]
> > What could possibly be the reason for this?? Why the inconsistency in
> > running the subroutine?
> >
> > Cheers
> >
> >[/color]
>
>[/color]


  #4  
Old July 19th, 2005, 05:52 AM
Chris Barber
Guest
 
Posts: n/a
Default Re: Calling a Visual Basic Component Subroutine from ASP

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" <mfarber@iiac.com> wrote in message
news:OJRFMiMTDHA.2852@tk2msftngp13.phx.gbl...[color=blue]
> 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[/color]
as[color=blue]
> it should. Very wierd.
>
>
>
>
> "Chris Barber" <chris@blue-canoe.co.uk.NOSPAM> wrote in message
> news:elyKRKMTDHA.2128@TK2MSFTNGP12.phx.gbl...[color=green]
> > 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[/color][/color]
Execution'?[color=blue][color=green]
> >
> > How do you know that the routine is not being called? Have you run the[/color][/color]
DLL[color=blue][color=green]
> > in debug mode?
> >
> > Chris.
> >
> > "Michael Farber" <mfarber@iiac.com> wrote in message
> > news:OsqmloLTDHA.1320@TK2MSFTNGP12.phx.gbl...[color=darkred]
> > > 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[/color][/color][/color]
do[color=blue][color=green][color=darkred]
> > > some work. I instantiate the component in asp and then attempt to[/color][/color][/color]
call[color=blue][color=green]
> > the[color=darkred]
> > > subroutine. The subroutine is actually invoked maybe 2 out of 10[/color][/color][/color]
times[color=blue][color=green]
> > run.[color=darkred]
> > > What could possibly be the reason for this?? Why the inconsistency in
> > > running the subroutine?
> > >
> > > Cheers
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


  #5  
Old July 19th, 2005, 05:52 AM
Dan Brussee
Guest
 
Posts: n/a
Default Re: Calling a Visual Basic Component Subroutine from ASP

In article <elyKRKMTDHA.2128@TK2MSFTNGP12.phx.gbl>, chris@blue-
canoe.co.uk.NOSPAM says...[color=blue]
> 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" <mfarber@iiac.com> wrote in message
> news:OsqmloLTDHA.1320@TK2MSFTNGP12.phx.gbl...[color=green]
> > 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[/color]
> the[color=green]
> > subroutine. The subroutine is actually invoked maybe 2 out of 10 times[/color]
> run.[color=green]
> > What could possibly be the reason for this?? Why the inconsistency in
> > running the subroutine?
> >[/color][/color]

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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.