MQ 7.5,C#,Impersonation - 创建“MQQueueManager”对象时的异常。
尝试连接到MQ服务器并将消息从C#控制台应用程序发布到Queue。用于与之前的MQ版本6.0一起正常工作,但在升级到7.5(服务器和客户端)之后,在“MQQueueManager”对象创建时生成异常。
当前的解决方案(C#控制台应用程序)能够在本地计算机用户(网络登录)下运行时将消息发布到队列,该用户在开发计算机上具有管理员权限,但需要模拟(我们必须这样做才能发布)消息到队列)作为用户X,它在创建“MQQueueManager”对象时失败。通过将模拟用户(用户X)添加到开发计算机上的Admin组,它可以完美地工作并能够将消息发布到队列,但我们无法将用户X分配给生产框上的Admin组。还尝试将用户X添加到“mqm”(MQ管理员)组但无效。
所以它看起来是一些许可问题。任何帮助将不胜感激?
异常详情:
System.TypeInitializationException: The type initializer for 'IBM.WMQ.MQQueueManager' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Failed to load mqe.dll from folder C:\Program Files\IBM\WebSphere MQ\bin\
at IBM.WMQ.Nmqi.NativeManager.InitializeNativeApis(String mode)
--- End of inner exception stack trace ---
at IBM.WMQ.MQCommonServices..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at IBM.WMQ.CommonServices.CreateCommonServices()
at IBM.WMQ.CommonServices.TraceEnabled()
at IBM.WMQ.MQBase..ctor()
at IBM.WMQ.Nmqi.NmqiEnvironment..ctor(NmqiPropertyHandler nmqiPropertyHandler)
at IBM.WMQ.Nmqi.NmqiFactory.GetInstance(NmqiPropertyHandler properties)
at IBM.WMQ.MQQueueManager..cctor()
--- End of inner exception stack trace ---
at IBM.WMQ.MQQueueManager..ctor(String queueManagerName, Hashtable properties)
at S.MQ.SMQQueueManager.CreateMQQueueManager() in C:\Development\SMQLib\SMQQueueManager\SMQQueueManager.cs:line