Re: "ASPCompat" attribute
- From: bruce barker <nospam@xxxxxxxxxx>
- Date: Fri, 09 Nov 2007 08:15:43 -0800
you must use the aspcompat feature with sta com objects (all vb6 objects are sta). this is because asp.net is free threaded and does not honor sta requirements.
http://msdn2.microsoft.com/en-us/library/zwk9h2kb.aspx
asp.net web services do not support aspcompat, so you must create your own sta thread and manage calls, or follow:
http://support.microsoft.com/kb/303375
also avoid storing sta objects in session as there have been a lot of bugs with this.
-- bruce (sqlwork.com)
Sergio Martins wrote:
Hi..
I have an ActiveX DLL, developed in Visual Basic 6.0 and I need to use that DLL inside an ASP.NET application, developed in Visual Basic .Net 2003.
My problem is that in my machine I get the error "QueryInterface for interface ... failed" when I try to use same method of the ActiveX DLL. I try the same application in another machine and everything works fine. I found that if I set the "AspCompat=True" attribute in the page the application works fine in all machines.
My questions are:
1. Why the same ASP.NET application in my machine doesn’t work without the "ASPCompat" attribute and works in another machine?
2. There is same way to avoid using the "ASPCompat" attribute and have the ASP.NET application working in any machine?
3. Can anyone point me an article where Microsoft describes step-by-step how to use a Visual Basic 6.0 DLL called from an ASP.NET application? I found the article http://support.microsoft.com/kb/811658/en-us but the focus of this one is the debug and not the development of the solution.
Thanks in advance,
Sérgio Martins
- Follow-Ups:
- Re: "ASPCompat" attribute
- From: Sergio Martins
- Re: "ASPCompat" attribute
- Prev by Date: Re: using custom database for membership and rolls ?
- Next by Date: Do I have to use ViewState?
- Previous by thread: Your advice please. I am using the membership system. Works well. However I want to log someone in automatically. How?
- Next by thread: Re: "ASPCompat" attribute
- Index(es):
Relevant Pages
|