1C and Dynamix AX

Web services, COM, .Net framework, External components etc. Integration with SAP, MS Dynamics etc.
speterburger
Posts: 2
Joined: Thu Dec 22, 2011 6:04 am

1C and Dynamix AX

Postby speterburger » Thu Dec 22, 2011 7:31 am

There are any samples or solution using Ne Business Connector from 1C Enterprise 8.2?

Elisy
Posts: 74
Joined: Fri Jan 23, 2009 3:15 am
Contact:

Re: 1C and Dynamix AX

Postby Elisy » Wed Dec 28, 2011 6:09 am

You can try Elisy .Net Bridge 4 plug-in to access .NET Business Connector. The 1C script sample will be like this:

Code: Select all

//Elisy .Net Bridge initialization
AttachAddIn("Elisy.NetBridge4");
AddIn = New("AddIn.ElisyNetBridge4");
net = AddIn.GetNet();

net.LoadAssemblyFrom("<pathto>\microsoft.dynamics.businessconnectornet.dll");
ax = net.New("Microsoft.Dynamics.BusinessConnectorNet.Axapta");
ax.Logon("", "", "", "");

o = ax.CallStaticClassMethod("SysLabel", "labelId2String2", "@SYS21669");

b = ax.Logoff();


speterburger
Posts: 2
Joined: Thu Dec 22, 2011 6:04 am

Re: 1C and Dynamix AX

Postby speterburger » Thu Dec 29, 2011 6:28 am

net.LoadAssemblyFrom("C:\Windows\assembly\GAC_32\Microsoft.Dynamics.BusinessConnectorNet\5.0.0.0__31bf3856ad364e35\Microsoft.Dynamics.BusinessConnectorNet.dll");

Произошла исключительная ситуация (Elisy.NetBridge.dll): System.Reflection.TargetInvocationException: Адресат вызова создал исключение. ---> System.IO.FileLoadException: Сборка для смешанного режима построена на основе версии "v2.0.50727" среды выполнения и не может быть загружена в среде выполнения 4.0 без дополнительных конфигурационных данных.

Elisy
Posts: 74
Joined: Fri Jan 23, 2009 3:15 am
Contact:

Re: 1C and Dynamix AX

Postby Elisy » Tue Jan 03, 2012 8:36 am

speterburger wrote:net.LoadAssemblyFrom("C:\Windows\assembly\GAC_32\Microsoft.Dynamics.BusinessConnectorNet\5.0.0.0__31bf3856ad364e35\Microsoft.Dynamics.BusinessConnectorNet.dll");

Произошла исключительная ситуация (Elisy.NetBridge.dll): System.Reflection.TargetInvocationException: Адресат вызова создал исключение. ---> System.IO.FileLoadException: Сборка для смешанного режима построена на основе версии "v2.0.50727" среды выполнения и не может быть загружена в среде выполнения 4.0 без дополнительных конфигурационных данных.

This error shows that Microsoft.Dynamics.BusinessConnectorNet.dll has been targeted to .Net 2.0. If it's impossible to find assembly targeted to the more modern .Net framework 4.0 you should add configuration file named like the exe with .config extention.
For example to resolve this situation at 1C 8.2 you should try to create the file 1cv8c.exe.config added into the attachment . It's described in
http://www.davidmoore.info/2010/12/17/running-net-2-runtime-applications-under-the-net-4-runtime/
http://stackoverflow.com/questions/1604663/what-does-uselegacyv2runtimeactivationpolicy-do-in-the-net-4-config
It's xml-file containing:

Code: Select all

<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
  </startup>
   <runtime>
      <NetFx40_LegacySecurityPolicy enabled="true"/>
   </runtime>
</configuration>

1cv8c.zip
1cv8c.exe.config file
(273 Bytes) Downloaded 3565 times


Return to “Plug-ins and integration with other solutions”

Who is online

Users browsing this forum: No registered users and 1 guest