Unable to finish processing COM related Event in ASP.NET

C

Chris Smedley

I am sure this is a simple question.

I have a legacy VB6 COM Object that collects information on a local PC
device. I want to be able to have it be invoked from an ASP Page. I have
Done the following

Dim Withevents MyCom as MYCom.XYZ

Created a Sub that collected MYCom's event. During debugging I can see that
the method is being invoked properly and the debugger will stop within the
my event handler.

A examination of the returned data within the debugger is fine, however, I
cannot do an Response.Redirect or Server.Transfer within that same event
handler.

What I basically want to do is when the handler is invoked to store the
result data as a session variable and then move to another page. this next
page will display the results.
However as I note the Response.Redirect statement does not seem to do
anything.

What am I missing here?

Thanks for your time
 
S

Steven Cheng[MSFT]

Hi Chris,


Thanks for posting in the community!
From your description, you encountered some problems when calling the
"Response.Redirect" or "Server.Transfer" mehtod in a VB6 COM object which
is used in an CLASSIC ASP page, yes?
If there is anything I misunderstood, please feel free to let me know.

As for this problem, I think you may have a check to see whether the
"Response" or "Server" or other certain ASP buildin in objects is well
passed in that COM object. Would you please try out the following steps:
1.Try calling the other methods or members of the "Response" or "Server"
object to see whether the problem remains.

2. If still remains, try creating another simple VB6 COM component and used
the ASP buildin object such as Response, Request, Server.. in it to see
whether the problem remains. If not, you may compare it with the COM with
problems to see if there're any differences.

Also, since I'm not sure how this COM component is used in your ASP
component would you please provide some more infos on the ASP page or the
detailed code logic in the COM object so that I can do some further
research on my side?

In addition, here are some tech articles on developing ASP components using
VB, you may also have a look to see whether they can provide any assitance:

#Making ASP component in VB
http://www.sloppycode.net/asp-components/tutorial/

#Build Components for the Web
http://msdn.microsoft.com/library/en-us/dnvbpj00/html/pc0011.asp?frame=true




Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top