Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VUDU all over (COM+ interop failed in weird ways)
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Titre:
VUDU all over (COM+ interop failed in weird ways)
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Divers
Thread ID:
01097114
Message ID:
01097114
Vues:
84
I have a COM+ component made in Fox. Their role is for bussines logic and data acces for a big ERP system. I made a ASP.NET front-end and consume it.

This is working fine in our development machines, but is going crazy in a demo machine we setup.

This are all the info I can get:

1- The original DLL fail to import under VS.NET and tlbimp with this message:

TlbImp error: System.TypeLoadException - Error: Signature has invalid ELEMENT_TY
PE_* (element type: 0x

2- I import the DLL into COM+. This error appear in the event log (in spanish):

Category: (99) Id. : 4459

"Se produjo un error al registrar este componente de forma controlada. Se registró directamente. Si no utiliza particiones puede pasar por alto esta advertencia. Si utiliza particiones, es posible que necesite agregar componentes compatibles, necesarios para poder registrar correctamente este componente. Compruebe la documentación para obtener más detalles.D:\Comunes\Librerias\gygServidorOle.dll

Nombre del proceso: dllhost.exe
Archivo Comsvcs.dll, versión: ENU 2001.12.4414.308 shp"

HOWEVER, despite this 2 problems the DLL work fine in our machines. I use this for create the objects:

Interaction.CreateObject("GyGServidorOle.TLectorConfigFormulario")

In our DEMO machine, all setup accordly, this error happend:

[MissingMemberException: No se encuentra el miembro pblico 'ObtenerEstructura' en el tipo 'Itlectorconfigformulario'.]
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) +769
Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) +23
srvConstructorFormsNET.TDataManager.ObtenerEstructura(String lcSql, Object[,]& laTablas, Object[,]& laCampos) in D:\Basura\ActiveNET\Clases\srvConstructorFormsNET

This happend AT RANDOM. ie, sometimes fail, others works.

The most weird thing is that is NOT only this method that fail. If this work MAYBE later in other call to the component the same error with diferent method happend.

So, I install VFP 8, the .NET SDK and debug the damm thing. I debug using (http://www.west-wind.com/presentations/VfpDotNetInterop/aspcominterop.asp) to step by step into the VFP code.

Then work :(

Then later, not work :( :(

And then, is not a clear reproduceable thing!

And still worst, fail BY DIFERENT REASONS!

The most common fail is when I call a method that return a ADO recordset, then convert it to ADO.NET. I don't knwo in where, exactly, is the fail. I don't can see if the fail happend exactly under the COM+ component or in the .NET call or in the return of the object.

If I remove the DLL from COM+ Manager then other error happend. This:

[InvalidComObjectException: ?]
System.Variant.MarshalHelperConvertObjectToVariant(Object o, Variant& v) +38
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +435
Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String name, BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +335
Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) +480
srvConstructorFormsNET.srvConstructorFormsNET.TInformes.EjecutarInforme(String lcInforme, String lcSql, String lcWhere, Int32 lnMesIni, Int32 lnMesFin, Int32 lnYearIni, Int32 lnYearFin) in D:\Basura\ActiveNET\Clases\srvConstructorFormsNET\TAdministradorInformes.vb:232

Is in a diferent method, this call a .EXE COM process. That mean the all the other methods that fail UNDER COM+ pass fine if is out.

I check the security and both accounts (asp.net) and loca administrator have the same rigths in the database, the file system and COM+.

If a put a strtofile( inside the methods and not run the debuggin, I can see that everything is going work. Unfortunaly I don't can see if really is doing it ok, because for example ObtenerEstructura is called several times and I don't know how log each call with a dirent Id to identify where fail.

This is going me crazy for a full month now, and everything I read in google about the errors give me mixed paths...
The Life is Beautiful!

Programmer in
Delphi, VS.NET
MCP
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform