I am trying to develop an integration from CRM 2013 Online to another online applikation. To connect to the application I need to connect via Https.
I have used the following code:
Binding mybinding = new BasicHttpsBinding();
EndpointAddress address = new EndpointAddress("https:\\[URL TIL WEBSERIVCE]");
_client = new EconomicWebServiceSoapClient();
((BasicHttpsBinding)_client.Endpoint.Binding).AllowCookies = true;
_client.Connect(_configuration.Account, _configuration.User, _configuration.Password);
When the code is executed I get the following error: "System.TypeLoadException: Could not load type 'System.ServiceModel.BasicHttpsBinding' from assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'." (I guess I will have the same problem with "System.Runtime.Serialization.dll"?).
Which version of System.ServiceModel is avaliable in the default environment? Have anyone solved this in anyway?