Answered by:
System.ArgumentNullException: Value cannot be null.

Question
-
Hi
I am getting this exception on receive portPort Type - Send and Receive Port
System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.CreateChannelFactory[TChannel](IBaseMessage bizTalkMessage)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.InitializeValues(IBaseMessage message)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2..ctor(IBaseMessage message, WcfTransmitter`2 transmitter)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfTransmitter`2.GetClientFromCache(String spid, IBaseMessage message)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfAsyncBatch`2.BatchWorker(List`1 messages)Thanxs in Advance
Thursday, December 1, 2016 8:01 AM
Answers
-
Hi
Please refer-
Ensure that you have specified SOAP Action -
https://social.msdn.microsoft.com/Forums/en-US/11743937-67b9-4a34-beab-a946482d8100/wcf-oracle-connection-problem?forum=biztalkr2adapters
and
https://masteringbiztalkserver.wordpress.com/tag/argumentnullexception/
Also, confirm that the credentials you have supplied on the Port are correct.
Thanks Arindam
- Edited by Arindam Paul RoyEditor Thursday, December 1, 2016 8:12 AM
- Proposed as answer by Rachit SikroriaModerator Thursday, December 8, 2016 1:45 AM
- Marked as answer by Rachit SikroriaModerator Thursday, December 8, 2016 1:46 AM
Thursday, December 1, 2016 8:11 AMModerator -
Hi,
You need to specify your SOAP Action Header!
Refer similar thread: https://social.msdn.microsoft.com/Forums/en-US/a403d108-d6a8-4a34-9899-04b127a66031/biztalk-sned-port-with-wcf-custom-adapter?forum=biztalkgeneral
Rachit Sikroria (Microsoft Azure MVP)
- Edited by Rachit SikroriaModerator Thursday, December 1, 2016 8:24 AM
- Proposed as answer by Rachit SikroriaModerator Thursday, December 8, 2016 1:45 AM
- Marked as answer by Rachit SikroriaModerator Thursday, December 8, 2016 1:46 AM
Thursday, December 1, 2016 8:14 AMModerator
All replies
-
Hi
Please refer-
Ensure that you have specified SOAP Action -
https://social.msdn.microsoft.com/Forums/en-US/11743937-67b9-4a34-beab-a946482d8100/wcf-oracle-connection-problem?forum=biztalkr2adapters
and
https://masteringbiztalkserver.wordpress.com/tag/argumentnullexception/
Also, confirm that the credentials you have supplied on the Port are correct.
Thanks Arindam
- Edited by Arindam Paul RoyEditor Thursday, December 1, 2016 8:12 AM
- Proposed as answer by Rachit SikroriaModerator Thursday, December 8, 2016 1:45 AM
- Marked as answer by Rachit SikroriaModerator Thursday, December 8, 2016 1:46 AM
Thursday, December 1, 2016 8:11 AMModerator -
Hi,
You need to specify your SOAP Action Header!
Refer similar thread: https://social.msdn.microsoft.com/Forums/en-US/a403d108-d6a8-4a34-9899-04b127a66031/biztalk-sned-port-with-wcf-custom-adapter?forum=biztalkgeneral
Rachit Sikroria (Microsoft Azure MVP)
- Edited by Rachit SikroriaModerator Thursday, December 1, 2016 8:24 AM
- Proposed as answer by Rachit SikroriaModerator Thursday, December 8, 2016 1:45 AM
- Marked as answer by Rachit SikroriaModerator Thursday, December 8, 2016 1:46 AM
Thursday, December 1, 2016 8:14 AMModerator -
Hi Arindam
I tried the above mentioned method but still no luck...One more thing i want to add here is
The xml i am sending is contains one envelop, body and Create tag which is correct but when i check in the admin console on that send receive port when the orchestration is in Dehydrated state message parts shows one more set of envelop,body and create tag inside the original tag.I am not able to understand from where these additional tag get attached to the xml at run time.And i am getting this exception now
System.Net.WebException: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.Thanxs
- Edited by BizTalkDeveloper2016 Thursday, December 1, 2016 9:26 AM
Thursday, December 1, 2016 9:24 AM -
Ok, so firstly you should not be creating the SOAP envelope, or body in your orchestration. The message you construct should ONLY contain the Create record and its contents.
The WCF adapter will create the SOAP envelope and body for you. You only need to pass the Create element from your code.
Regarding the auth issue, I guess you have already created a separate thread for that.
Thanks Arindam
- Edited by Arindam Paul RoyEditor Thursday, December 1, 2016 3:04 PM
Thursday, December 1, 2016 3:03 PMModerator