In one of our plugins, we encountered “The specified domain does not exist or cannot be contacted – System.FormatException: Input string was not in a correct format” error. Basically this issue can arise due to incorrect string formatting, unexpected data types, or missing values.

Our initial thought was that it could be because one of the GUID data type fields was null and being used in the Retrieve method.
However, it turned out to be because of the following trace statement.
Sample code –

Extra space inside { 1}. The correct syntax is {1} instead of { 1}. We removed the extra space.

This fixed the issue for us.
Hope it helps..
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.

One thought on “Fixed – “Input String Was Not in a Correct Format / The specified domain does not exist or cannot be contacted” in Dataverse Plugin (Dynamics 365)”