I am using IBM MQ nuget package IBMXMSDotnetClient 9.3.4.1 (XMS.net). Visual Studio 2022 and .Net 6.
Launching the swagger in IIS I am getting below error -
Application '/LM/W3SVC/6/ROOT' with physical root 'C:\inetpub\wwwroot.Project.API' hit unexpected managed exception, exception code = '0xe0434352'. First 30KB characters of captured stdout and stderr logs: 'dspmqver' is not recognized as an internal or external command, operable program or batch file. Unhandled exception.
System.IO.FileNotFoundException: Error reading the directory.
at System.IO.FileSystemWatcher.StartRaisingEvents()
at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
at IBM.WMQ.MQClientCfg.CheckForMqclientIniFileChanges()
at IBM.WMQ.Nmqi.NmqiEnvironment..ctor(NmqiPropertyHandler nmqiPropertyHandler)
at IBM.WMQ.Nmqi.NmqiFactory.GetInstance(NmqiPropertyHandler properties)
at IBM.XMS.Client.WMQ.Common.WmqPropertyHandler..ctor()
at IBM.XMS.Client.WMQ.Factories.WmqConnectionFactory.InitialiseWMQConnectionFactory()
at IBM.XMS.Client.WMQ.Factories.WmqConnectionFactory..ctor(XmsPropertyContext props)
at IBM.XMS.Client.WMQ.Factories.WmqFactoryFactory.CreateProviderConnectionFactory(XmsPropertyContext properties)
at IBM.XMS.Client.Impl.XmsConnectionFactoryImpl.SetProviderFactory()
at IBM.XMS.Admin.Objects.MQConnectionFactory..ctor()
at IBM.XMS.Admin.Objects.WmqXmsFactory.CreateConnectionFactory()
at IBM.XMS.Client.Impl.XmsFactoryFactoryImpl.CreateConnectionFactory()
The apppool is set to Runtime - No managed code
I did IIS reset and browsed, Still getting same error - What is it with mcclient.ini? what location is expected here?
Any help appreciated.
I am not using any MQClient.ini as its not required by application. "dspmqver" is accessbile and I can run "C:> dir /b /s C:\setmqenv.cmd" and "C:> dir /b /s C:\dspmqver.exe" are giving expected results.
My application is running fine in Visual Studio 2022 and as a Console application IBM MQ Client 9.3.5 mqclient.ini is created by setup at C:\Program Files\IBM\MQ\samp\mqclient.ini
Also, I have given full access to IUSR and application user.
This error may be related to the bitness of the IBM MQ nuget package. You can try to set enable 32-bit application in iis to solve the problem.
Go to Website >Select the application pool your 32-bit application will run under > Click Advanced setting > Set Enable 32-bit Applications to True.