RE: App.Path in Class_Initialize (or MS VB runtime threading bug)
From: DJThompson (DJThompson_at_discussions.microsoft.com)
Date: 12/17/04
- Previous message: DJThompson: "RE: App.Path in Class_Initialize (or VB Runtime threading bug?)"
- In reply to: Jason R. Schmidt: "App.Path in Class_Initialize"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 17 Dec 2004 06:43:03 -0800
We're having the same symptoms. For us, it appears to be a threading problem
with VB runtime. We have an ASP application calling a method in a component
registered in COM+ Services. Our code works fine (famous last words) but
when we call Replace() or Dir() in the VB Runtime (MSVBVM60.DLL) we get
"ActiveX component cannot create object". Our ASP pages work fine until the
site is under heavy load. We presume that as IIS starts using more and more
threads for serving requests, we end up calling the Replace() and Dir()
functions from multiple threads simultaneously. When this happens, some ASP
page requests will fail with the aforementioned error.
We originally noticed the behaviour when continously pressing F5 very
quickly - some requests would fail.
**We can reliably reproduce the error in the VB runtime** simply with a
small multi-threaded C# application (source available: post here to request)
which calls a method in a VB6 COM+ DLL multiple times simulaneously across
multiple threads. The VB6 DLL method just calls the Replace() function. As
a result, we get "ActiveX component cannot create object" errors arising from
making the Replace() call. This error is not arising as a result of
evaluating the parameters to the call.
Our VB6 DLL is configured to use apartment threading - it appears that the
Replace() and Dir() functions no longer work in this model as the result of a
recent change by Microsoft.
Does anyone know of a work-around until Microsoft notices & patches?
Thanks!
"Jason R. Schmidt" wrote:
> Hi, I am having a strange issue with a class in VB6. I am running a
> webserver using IIS on windows 2000 and an ASP UI. I am receiving random
> "activex can't create component" errors. If you refresh the page, the error
> goes away. If you refresh again, it will happen. This occurs randomly. If
> IIS is restarted, the web page doesn't encounter this error until around a
> week later.
>
> The class causing the problem built some logging path information in the
> Class_Initialize method by using the App.Path object. I determined this
> object was causing the problem because the error hasn't happened since we
> removed it.
>
> Just wondering if anyone had ever seen this?
>
> Thanks
>
- Previous message: DJThompson: "RE: App.Path in Class_Initialize (or VB Runtime threading bug?)"
- In reply to: Jason R. Schmidt: "App.Path in Class_Initialize"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|