Error: “Value cannot be null. Parameter name: val” (or Parameter name: oldValue)

March 29, 2011 Orchestration Issue

If you get this mysterious error in a BizTalk orchestration:

Value cannot be null. Parameter name: val 

If you are running an orchestration, then a potential problem is that you tried to set a “distinguished field” to the value of NULL.

How I hit this error today ? I had a config parm from the BTNTSVC.exe.config file, that the orchestation was using to set the distinguished field. I thought the parm was optional, so I removed it from the config file. Then “BOOM” – the orchestration that had been working for months quit working with the “mystery error” above.

So now, I check for the config parm, and if it’s null, I reset it to an empty string.

May 17, 2017 Pipeline C# ReplaceString Issue

Value cannot be null. Parameter name: oldValue

Today, this happened in a pipeline component. Due to a logic error, a field had a value of Null, and it was being passed to a C# ReplaceString function as the “oldValue”. The oldValue parm can be an empty string, but it cannot be null.

Uncategorized  

Leave a Reply