【问题标题】:Difficulty running .net MQ application难以运行 .net MQ 应用程序
【发布时间】:2014-10-29 18:41:05
【问题描述】:

您好,我在运行 .NET 应用程序时遇到以下错误

D:\Program Files\AscentSS\AscentSV\Staging\SimplePut>SimplePut -q ESB.BAT1.SERVICES.KOFAX.DOC.METADATA -h 10.49.97.31 -p 1417 -l BLI1.KOFAX.CLIENT
Start of SimplePut Application

Exception caught: System.IO.FileNotFoundException: Could not load file or assembly 'amqmdnet, Version=7.5.0.1, Culture=neutral, publicKeyToken=dd3cb1c9aae9ec97' or one of its dependencies. The system cannot find the file specified. File name: 'amqmdnet, Version=7.5.0.1, Culture=neutral, PublicKeyToken=dd3cb1c9aae9ec97'
   at SimplePut.SimplePut.PutMessages()
   at SimplePut.SimplePut.Main(String[] args) in C:\Users\youngj\Documents\Visual Studio 2010\Projects\SimplePut\SimplePut.cs:line 102

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Sample execution FAILED!

End of SimplePut Application

但是,具有相同公共令牌的文件确实存在:

D:\Program Files\IBM\WebSphere MQ\bin>"C:\Program Files\Microsoft SDKs\Windows\v
7.0A\bin\sn" -T amqmdnet.dll

Microsoft (R) .NET Framework Strong Name Utility  Version 3.5.30729.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Public key token is dd3cb1c9aae9ec97

有什么想法吗?应用程序是在 x64 Win7 上编译的。试图在 x32 Win2003 服务器上运行它。谢谢。

【问题讨论】:

  • 仅供参考,已安装完整的 7.5.0.1 MQ 客户端。
  • 尝试将amqmdnet.dll复制到system32syswow64

标签: .net ibm-mq windows-server-2003 filenotfoundexception mq


【解决方案1】:

MQs .NET 层不是一个 dll,而是其中的一些(amqmdxcs、amqmdnet、amqmdmsg 等)——尤其是从 7.0.1 开始。您是否实际安装了 MQ 服务器/客户端软件,或者您是否尝试部署一个引用 MQ 的应用程序并期望它与包含的 MQ 部件一起部署?

尝试在正确安装了 MQ 产品的机器上运行您的代码 - 如果是 7.1 或更高版本,您需要将其设为主要(默认为)以便在 GAC 中注册 MQ 部件,或者您需要一个配置文件指向文件系统上的 MQ dll。查看 Tools\dotnet\samples\cs\base 并尝试首先让基本示例正常工作。

如果所有其他方法都失败了,请按照说明执行的操作并启用日志记录并查看它显示的内容 :-)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-08-10
    • 2021-12-13
    • 1970-01-01
    • 2015-10-29
    • 1970-01-01
    • 2010-12-19
    • 2023-02-19
    相关资源
    最近更新 更多