IIS应用程序应将MQClient.ini驻留在哪里? [英] Where should MQClient.ini reside for an IIS Application?
问题描述
我在需要使用IBM WebSphere MQ mqclient.ini
文件的IIS网站下安装了一个Web应用程序(WebApi2/c#).
I've got an web application (WebApi2 / c#) installed under an IIS Web Site that needs to use an IBM WebSphere MQ mqclient.ini
file.
ini文件应该存放在哪里?我在应用程序的bin
文件夹以及%system32%\inetsvr
文件夹中都尝试过,但是没有运气.
Where's the ini file supposed to reside? I've tried in the application's bin
folder, as well as %system32%\inetsvr
, with no luck.
希望有人可以指出该位置,因为我无法通过IBM文档找到正确的位置...
Hoping someone can point out where this is supposed to reside, as I haven't been able to locate the correct location via IBM's documentation...
推荐答案
MQ Client查找mqclient.ini
文件的位置记录在IBM MQ v7.5(或更高版本)知识中心页面"客户端配置文件的位置":
The locations where MQ Client will look for the mqclient.ini
file are documented in the IBM MQ v7.5 (or later) Knowledge Center page "Location of the client configuration file":
MQ客户端应用程序将在下面的位置从1到4依次查找文件.这是上述KC页面的摘要,并附有我的一些补充说明:
A MQ client app will look in locations below in order from 1 to 4 for the file. This is a summary of the above KC page with some additional notes from me:
- 如果只想设置一个全局位置,则可以设置一个名为
MQCLNTCF
的服务器环境变量,以指向mqclient.ini文件的路径和文件名.
应用程序当前工作目录中的 -
mqclient.ini
.在我们的测试中,我们无法将其用于IIS应用程序.
在安装了MQ的数据目录中的 -
mqclient.ini
中,可以通过查看MQ_FILE_PATH
环境变量来检查此位置.
目录中的 -
mqclient.ini
由HOMEDRIVE
和HOMEPATH
环境变量的串联值组成.
- If you just want to set a global location you can set a server environment variable called
MQCLNTCF
to point to the path and file name of your mqclient.ini file. mqclient.ini
in the present working directory of the application. In our testing we could not get this to work for a IIS application.mqclient.ini
in the Data directory where MQ is installed, you can check this location by looking at theMQ_FILE_PATH
environment variable.mqclient.ini
in the directory consisting of the concatenated values of theHOMEDRIVE
andHOMEPATH
environment variables.
此外,如果使用的是Managed .NET客户端,则另一个选择是将设置放置在应用程序的app.config
或web.config
文件中.在"
In addition if you are using Managed .NET client another option is to place settings in the application's app.config
or web.config
file. This is documented in the IBM MQ v7.5 (or later) Knowledge Center at the bottom of the page "Configuration files for WebSphere MQ classes for .NET". This page provides an example that you can use as a model for any of the settings that are honored by the Managed .Net client.
这篇关于IIS应用程序应将MQClient.ini驻留在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!