4.0.6 Trader.Connect() MethodAccessException
Заменил 4.0.5 на 4.0.6, внес изменения, нормально скомпилировалось, запускаю, Trader.Connect() выдает:
КодAttempt by security transparent method 'Ecng.Interop.WinApi.GetProcessId(ManagedWinapi.Windows.SystemWindow)' to call native code through method 'Ecng.Interop.WinApi.GetWindowThreadProcessId(IntPtr, Int32 ByRef)' failed. Methods must be security critical or security safe-critical to call native code.
Attempt by security transparent method '#=qKfFOb$dmmYy_28XmokQi8u_CFnpAsKDaUbiigICkX9c=.DisposeNative()' to call native code through method '#=qKfFOb$dmmYy_28XmokQi8u_CFnpAsKDaUbiigICkX9c=.#=qui7SGkL$iNzM5199s$PjSQ==(IntPtr)' failed. Methods must be security critical or security safe-critical to call native code.
System.MethodAccessException
Stack Trace:
at #=qKfFOb$dmmYy_28XmokQi8u_CFnpAsKDaUbiigICkX9c=.DisposeNative()
at Ecng.Common.Disposable.Finalize()
После замены Ecng.*.dll на Change Set 11980 выдаваемое сообщение несколько изменилось:
КодAttempt by security transparent method '#=qKfFOb$dmmYy_28XmokQi8u_CFnpAsKDaUbiigICkX9c=..ctor(System.String)' to call native code through method '#=qKfFOb$dmmYy_28XmokQi8u_CFnpAsKDaUbiigICkX9c=.#=qcmOMPVz4o0URNxOFjmfM4g==(System.String)' failed. Methods must be security critical or security safe-critical to call native code.
Attempt by security transparent method '#=qKfFOb$dmmYy_28XmokQi8u_CFnpAsKDaUbiigICkX9c=.DisposeNative()' to call native code through method '#=qKfFOb$dmmYy_28XmokQi8u_CFnpAsKDaUbiigICkX9c=.#=qui7SGkL$iNzM5199s$PjSQ==(IntPtr)' failed. Methods must be security critical or security safe-critical to call native code.
System.MethodAccessException
Stack Trace:
at #=qKfFOb$dmmYy_28XmokQi8u_CFnpAsKDaUbiigICkX9c=.DisposeNative()
at Ecng.Common.Disposable.Finalize()
Добавление [assembly: SecurityRules(SecurityRuleSet.Level1)] и <NetFx40_LegacySecurityPolicy enabled="true"/> ничего не изменило. Подскажите, пожалуйста, что нужно поправить.