Reputation: 171
Hello I am try to connect CRM online 2016 using Live wcf rest service hosted on Godaddy server But it gives an below error.But it works well in localhost.
Error:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveACSIssuerEndpoints(Uri trustUrl)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.SetAuthenticationConfiguration()
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceConfiguration..ctor(Uri serviceUri, Boolean enableProxyTypes, Assembly assembly)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri, Boolean enableProxyTypes, Assembly assembly)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)
at Microsoft.Xrm.Sdk.Client.ServiceProxy`1..ctor(Uri uri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials)
at PortalRestfulService.Service1.authentication(CRMCredential objauthentication)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Please suggest me solution.
Upvotes: 0
Views: 152
Reputation: 1470
Try copying your IdentityModel dll's into the bin folder.
But, because probably your WCF service in Godaddy uses a shared application pool and runs in partial trust, and therefore it runs with a limited set of permissions, you'll have other issues.
Try to recompile / retest your service in Partial Trust mode in localhost and you'll probably reproduce the issue.
So the solution would be either:
Upvotes: 1