ibm mq - Item has already been added. Key in dictionary: 'Hostname' Key being added: 'Hostname' in c# -


i trying push message ibm mq while adding properties hostname, channel , port getting below error when continue debug without stopping

item has been added. key in dictionary: 'hostname' key being added: 'hostname' in c#.

i have tried validate below,

if (!mqenvironment.properties.containskey(strhost) && !mqenvironment.properties.containskey(intport) && !mqenvironment.properties.containskey(strchannel))                 {                      mqenvironment.properties.add("hostname", strhost);                     mqenvironment.properties.add("port", intport);                     mqenvironment.properties.add("channel", strchannel);                     mqenvironment.properties.add(mqc.transport_property,mqc.transport_mqseries);                 } 

above code contains in mq putmessage method pushing message.

it looks it's not strhost that's there, it's "hostname". you'd need change checking be:

mqenvironment.properties.containskey("hostname") 

etc.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -