I installed WIF runtime and SDK on my machine. I added Microsoft.IdentityModel.dll to my azure web application and locally everything is running great. I build simple web application which use Azure AppFabric Access control. I follow azure labs for that and as I told, local everything is great. When I published my web application to Azure, I'm getting following error :
Unable to find assembly 'Microsoft.IdentityModel, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
I get it after Appfabric Relaying part is going to return url, after sign in on identity provider. The weird thing is that I set Copy Local to TRUE, because that .dll is not part of Azure GAC. I tried to publish it again, but I received same error. I found few same problems on the internet but with no concrete solution. Does anybody here had something similar and probably have a working solution? Thank you in advance
For anything that I need to deploy locally to Azure I make a copy of the DLL's in my project folder and reference them from there while setting copy local to true. Since doing this I no longer have any issues with DLL's not being published to Azure. I also do all of my building through the command line using MSBuild and publish the cspack by hand. This means that I do not rely on Visual Studio for doing the build or deployment.
I have run into this and solution described in this blog helped. You will need to run this command from your role startup task:
gacutil /nologo /i .\Microsoft.IdentityModel.dll
This startup task has to be run with full privilegies.
Have you tried disabling encryption on the creation of the deployment package and verifying that the dll is indeed present?
Create a new environment variable called: _CSPACK_FORCE_NOENCRYPT_ set the value to true.Restart your visual studio.