Failed to load file or assembly System.IdentityModel.Tokens.Jwt after deploying to Azure

my web application works fine on localhost, but when I publish it on Azure, I get the following error:

Failed to load file or assembly "System.IdentityModel.Tokens.Jwt" or one of its dependencies. The installed assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

It works fine on the local host.

I am using 4.5 framework and it is also defined in web.config file. I tried reinstalling it in nuget manager, but I get

The package 'System.IdentityModel.Tokens.Jwt.4.0.2.206221351' already exists in project 'project1'

I also cannot find this assembly in the links folder. This is the first time I have finished this type of problem.

What will you advice me?

Regards, Sandy

+4
source share
3 answers

I get it. I updated the System.IdentityModel.Tokens.Jwt link through the nuget package manager and it works again.

Hello!

+4
source

I had to roll back the grid of network points to 4.5.1

0
source

I have the same problem. I solved this problem by selecting “Update Dependencies” from the Detected Dependencies in my installation project. I think this is a mistake, because the System.IdentityModel.Tokens.Jwt assembly was in the target program files folder and had compatible version control. If you are not working with VS, perhaps you could associate this with your own development environment.

0
source

All Articles