Udostępnij za pośrednictwem


Could not load file or assembly ‘Microsoft.IdentityModel’

I ran into a problem trying to authenticate with CRM 2011 Online, I received the following error message when I tried to run my code:

Could not load file or assembly ‘Microsoft.IdentityModel Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencie. The system cannot fine the find specified.

The reason for receiving this error is because I don’t have the Windows Identify Foundation Pack installed on my Windows 7 machine.  To resolve this problem, I downloaded and installed the Windows Identity Foundation Pack.

Comments

  • Anonymous
    March 09, 2011
    Thanks, this helped me out :)

  • Anonymous
    October 20, 2011
    Correct and useful note.

  • Anonymous
    November 01, 2011
    At work we usually try to include EVERYTHING a developer may need right in the solution so he can just check the entire thing out on a brand new machine with a stock Visual Studio and it will work. Do you have any idea which .dll gets installed with Windows Identity Foundation Pack that, when missing, causes that error? I'd love to just include it instead of having developers install the pack.

  • Anonymous
    January 26, 2012
    Thanks, very helpful

  • Anonymous
    January 24, 2013
    Now it seems obvious why it can't load it :D Cheers mate

  • Anonymous
    March 11, 2013
    I tried downloading Windows Identity Foundation but it was already on my machine.  I get this error after publishing the site, the site works fine on my localhost. I am using VS2012 and the Target Framework for the site is 4.5.  Could this be the problem?

  • Anonymous
    September 11, 2013
    And yet another thanks.  Appreciate you writing it up.

  • Anonymous
    September 24, 2013
    The comment has been removed

  • Anonymous
    January 05, 2014
    I am also getting this error. I tried removing the given Reference and then adding it up, but of no Help Please suggest.

  • Anonymous
    May 28, 2014
    Thanks, this helped me too ..

  • Anonymous
    June 18, 2014
    Thanks you. This was a helpful post.

  • Anonymous
    June 18, 2014
    Thank you for identifying the issue. You can also include the Windows Identity reference in your project when you build and deploy.   As an earlier commenter mentioned.

  • Anonymous
    October 17, 2014
    Helped me. Thank you.

  • Anonymous
    October 21, 2014
    Thanks.. its works

  • Anonymous
    January 29, 2015
    Thanks... Saved me.  Works perfectly

  • Anonymous
    February 13, 2015
    Thank you. Spot on