0

We are migrating from ASP.net to MVC 5 architecture with MS CRM as the backend of the portal. The solution is running fine in the local machine and we are able to connect to CRM with the credentials. After we have published to azure, when we are truing to establish the connect with CRM , we are getting the below error message. ALl the dll exist in our solution but still getting the below error message. With Asp.net architecture, everything was working fine and we were able to establish the connectivity to CRM.

Can you please suggest what can be the issue? Are there any more DLLs that we need to add in our solution?

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

Getting the below warning

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].

techspider
  • 3,370
  • 13
  • 37
  • 61
  • Relevant: http://stackoverflow.com/questions/8269386/could-not-load-file-or-assembly-the-parameter-is-incorrect – trailmax Jun 28 '16 at 13:55

1 Answers1

0

Check if the Microsoft.IdentityModel.dll is getting dropped in the output folder. If the dll is referenced from one of the system paths, the build system assumes it would be found on the target machine as well and does not copy the dll into output.

To ensure that the dll gets included, add the required package to your project(nuget) and add a reference from there. Also, in the properties for the dll, set copy local to always.

As a best practice, if you can ensure that the build machine has the same set of software installed that you expect to find on the production machine, such issues can be found and fixed locally.

AVS
  • 531
  • 2
  • 13