John
John

Reputation: 961

Where should MQClient.ini reside for an IIS Application?

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.

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.

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...

Upvotes: 1

Views: 1948

Answers (1)

JoshMc
JoshMc

Reputation: 10652

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":

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:

  1. 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.
  2. mqclient.ini in the present working directory of the application. In our testing we could not get this to work for a IIS application.
  3. mqclient.ini in the Data directory where MQ is installed, you can check this location by looking at the MQ_FILE_PATH environment variable.
  4. mqclient.ini in the directory consisting of the concatenated values of the HOMEDRIVE and HOMEPATH environment variables.

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.

Upvotes: 2

Related Questions