2017-01-30 2 views
1

Ich habe eine gehostete App (MVC) von SharePoint Provider und eine gehostete Webanwendung in einer azure VM (WIN SERVER 2012) entwickelt.Konnte Datei oder Assembly nicht laden 'Microsoft.IdentityModel

Wenn wir versuchen, Anwendung mit einer App zu verwenden, löst es einen Fehler aus.

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

ich bereits dotNet 3.5 und 4.5 auf dem Server installiert haben. immer noch den gleichen Fehler. Kann mir jemand helfen?

Antwort

1

Sie benötigen Windows Identity Foundation entweder installed on your server oder in your project.

+0

In Windows Server 2012 an, bereits durch dotNet 4.5 und 3.5 mit OS. Sie müssen also nicht manuell installieren und wir können nur die Funktion für sie aktivieren. Wie auch immer, danke für Ihre freundliche Hilfe. – RiksonTool

0

Danke für Leute, die auf mich antworten. Ich könnte den Fehler beheben. Es war die fehlende Baugruppe in meinem Projekt.

1

Es geschieht, weil die gebrochenen Berechtigungen auf Datei Microsoft.IdentityModel.dll

Lösung ist;

Fügen Sie die folgenden drei Einträge% plesk_dir% \ etc \ DiskSecurity \ DiskSecurity.xml Datei:

<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" /> 

unter dem folgenden Eintrag:

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