I am looking to connect to CRM 2013 Online from a WCF webservice hosted on Azure. I have this working correctly on my dev box ( with the WCF service hosted in the Azure compute emulator),and can connect and retrieve data from CRM online with no issues.
To authenticate against CRM online I am passing the organisation, username and password as parameters to the web service method (I know it's not a great idea but this is only a test), and creating the CRMOrganisationService using these - again, this works fine locally.
However when I publish this WCF service to Azure I hit some problems. The service publishes correctly and can be accessed at the cloudapp.net address, however any attempt to call a method which retrieves data results in an exception back from the server about Microsoft.Identity.dll not being found.
In an attempt to resolve this I rdp'd t the cloud service instance and enabled Windows Identity Foundation 3.5 from the ServerManager feature view.
This now results in an exception "The type initializer for 'Microsoft.IdentityModel.Tokens.SecurityTokenHandlerConfiguration' threw an exception."
Any thoughts more than welcome....!
Thanks
Matt