Calling a Visual Basic Component Subroutine from ASP

Discussion in 'ASP General' started by Michael Farber, Jul 18, 2003.

  1. 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
     
    Michael Farber, Jul 18, 2003
    #1
    1. Advertising

  2. Michael Farber

    Chris Barber Guest

    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" <> wrote in message
    news:...
    > 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
    >
    >
     
    Chris Barber, Jul 18, 2003
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    > > 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
    > >
    > >

    >
    >
     
    Michael Farber, Jul 18, 2003
    #3
  4. Michael Farber

    Chris Barber Guest

    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" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    > > 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" <> wrote in message
    > > news:...
    > > > 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
    > > >
    > > >

    > >
    > >

    >
    >
     
    Chris Barber, Jul 18, 2003
    #4
  5. Michael Farber

    Dan Brussee Guest

    In article <>, 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" <> wrote in message
    > news:...
    > > 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.
     
    Dan Brussee, Jul 18, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Soni
    Replies:
    0
    Views:
    1,106
  2. Jim Hammond
    Replies:
    1
    Views:
    765
    Jim Hammond
    Nov 12, 2003
  3. asadikhan
    Replies:
    2
    Views:
    3,716
    =?Utf-8?B?SG1udA==?=
    Apr 25, 2004
  4. M P
    Replies:
    6
    Views:
    571
    Joe Fallon
    Aug 7, 2004
  5. king
    Replies:
    5
    Views:
    210
Loading...

Share This Page