views:

126

answers:

3

hi folks,

i'm struggling with an .net activeX i try to use in ms axapta 2009.

using this component on my local machine where it was compiled, it's working quite fine. it can be added as activeX element on a form, the methods and events are listed in the axapta-activeX-explorer and i can interact with it without any problems.

but trying to distribute the dll to other clients isn't working as intended. the registration of the dll via regasm /codebase /tlb works properly - getting the message, registration was successful. the component is also listed when selecting an activeX-element to add in ax, but neither functions nor properties are listed. and launching the form results in an errormessage - activeX component CLSID ... not found on system, not installed. the classID is indeed the one, defined in .net.

strange things happen, having a look on the task-manager. the activeX-component itself is just a wrapper to interact with a com-application. when launching the ax-form with the not working and _not_installed_!! activeX-thing, the taskmanager shows a new process of the com-application, which is instanciated by the activeX :/

things i tried:

  • using different versions of regasm, eg \Windows\Microsoft.NET\Framework\v2.0.50727 ; C:\Windows\Microsoft.NET\Framework64\v2.0.50727
  • using new GUIDs in .net, prior removing the old ones from the registry
  • compiling, using different versions of the .net framework
  • doing registration via regasm, regasm /codebase, regasm /codebase /tlb, using a visual-studio-setup
  • running registration via command-line as administrator
  • running setup as administrator
  • running even ax as administrator on client-machine
  • moving dll to a different folder followed by new registration ( windows/system32; ax/client/bin )
  • installing to GAC ( gacutil /i )
  • different project-options in visual studio ( COM-Visibility; register for COM-Interop; different targetPlatform )

hoped for the fact, that compiling in visual studio with register for COM-Interop option enabled does something more than just the regasm-registration, i used a registry-monitor-microsoft-tool for logging the registry-activity which happend during compilation.

using these logs to create all registry-entries on the target-client in addition didn't work either.

any hints or help would be so much appreciated! this thing is blocking me for days now :(

A: 

the "target"-application, with which i want to interact is a stand-alone exe with COM-functionality. as i know, COM isn't ( or will not be ) supported in AX 2009 - therefore .net should be used. if i understand your answer correctly, it's just the other one round! the dll just works as a wrapper to access the application mentioned above. regsvr32 don't work with the dll, since regasm must be used to register. i've also added a reference in the AOT - no change. curious thing is - it has already worked, and is still working on my local dev system. but not on other systems.

Nico
COM+ is supported by AX 2009, but it may not be in future versions.
Jan B. Kjeldsen
I still have not got a clue how your "target"-application and AX is supposed to work together. What is the "main" application, what type of communication is needed between the two.
Jan B. Kjeldsen
A: 

For an overview of COM integration look here:

http://msdn.microsoft.com/en-us/library/aa591337.aspx

For an overview of .Net integration look here:

http://msdn.microsoft.com/en-us/library/aa659581.aspx

Jan B. Kjeldsen
A: 

problem solved. everything was correct - only misleading thing was the error-message launching a form with the activeX-component added, telling "component not found on system..."

it was a totally different error in the activeX code: parsing a xml-document with a special character in it and without defining the correct iso-encoding in the xml-file had thrown an error not catched. this(!!) caused all further problems and the crash-bug mentioned in the initial post :/

thanks anyway for help.

Nico