2017-01-30 7 views
1

Я разработал приложение хоста SharePoint (MVC) и размещенное веб-приложение в iis of azure VM (WIN SERVER 2012).Не удалось загрузить файл или сборку «Microsoft.IdentityModel

Когда мы пытаемся использовать приложение с помощью приложения, оно выдает ниже ошибки.

enter image description here

Server Error in '/' Application.

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.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: 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.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

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

Я уже установил Dotnet 3,5 и 4,5 на сервере. все еще с той же ошибкой. Может кто-нибудь мне помочь?

ответ

1

Вам нужен Windows Identity Foundation либо installed on your server, либо in your project.

+0

В Windows Server 2012, это уже осуществляется Dotnet 4.5 и 3.5 с ОС. Поэтому нет необходимости вручную устанавливать, и мы можем включить эту функцию для них. В любом случае, спасибо за вашу любезную помощь. – RiksonTool

0

Спасибо за людей, которые ответили мне. Я могу решить эту ошибку. Это был недостающий сборник в моем проекте.

1

Это происходит из-за нерабочих разрешений на файл Microsoft.IdentityModel.dll

Solution является;

Добавьте следующие 3 записи в% plesk_dir% \ и т.д. \ DiskSecurity \ DiskSecurity.xml файл:

<Entry AccounType="1" Account="Psaadm" Path="{ProgramFilesX86}" 
SubPath="Reference Assemblies" AceFlags="ThisFolderSubfoldersAndFiles" 
AccessMask="NoAccess" EntryFlags="0" /> 
<Entry AccounType="1" Account="Psacln" Path="{ProgramFilesX64}" 
SubPath="Reference Assemblies" AceFlags="ThisFolderSubfoldersAndFiles" 
AccessMask="NoAccess" EntryFlags="0" /> 
<Entry AccounType="1" Account="Psaadm" Path="{ProgramFilesX64}" 
SubPath="Reference Assemblies" AceFlags="ThisFolderSubfoldersAndFiles" 
AccessMask="NoAccess" EntryFlags="0" /> 

ниже следующую запись:

<!-- Program Files\\Reference Assemblies --> 
<Entry AccounType="1" Account="Psacln" Path="{ProgramFilesX86}" 
SubPath="Reference Assemblies" AceFlags="ThisFolderSubfoldersAndFiles" 
AccessMask="NoAccess" EntryFlags="0" />