統合 Windows 認証を使用してユーザーを認証/承認する ASP.Net 2.0 アプリケーションがあります。このアプリケーションは、Windows XP/IIS 5.1、Windows Server 2008/IIS 7、および Windows Vista/IIS 7 で正常に動作します。このアプリケーションを Windows 7/IIS 7.5 で実行しようとすると、次の例外が発生します。The trust relationship between this workstation and the primary domain failed.
スタック トレースは次のとおりです。
[SystemException: The trust relationship between this workstation and the primary domain failed.
]
System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, Boolean& someFailed) +1085
System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) +46
System.Security.Principal.WindowsPrincipal.IsInRole(String role) +128
System.Web.Configuration.AuthorizationRule.IsTheUserInAnyRole(StringCollection roles, IPrincipal principal) +229
System.Web.Configuration.AuthorizationRule.IsUserAllowed(IPrincipal user, String verb) +354
System.Web.Configuration.AuthorizationRuleCollection.IsUserAllowed(IPrincipal user, String verb) +245
System.Web.Security.UrlAuthorizationModule.OnEnter(Object source, EventArgs eventArgs) +11153304
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
web.config ファイルには、認証/承認に関連する次の情報が含まれています。
<authentication mode="Windows" />
<authorization>
<!--Deny anonymous users-->
<deny users="?"/>
<allow roles="domain\GroupWithAccess"/>
<deny users="*"/>
</authorization>
このエラーを調査したときに見つけた結果のほとんどは、問題がドメイン内の壊れたコンピューター アカウントに関連していることを示しており、解決策としてドメインへの再参加が挙げられています。これを実行しましたが、エラーがまだ表示されます。「通常の」ドメイン操作は正常に機能します (UNC 共有へのアクセス、ログインなど)。
このアプリケーションは、互換性の理由から Classic .Net AppPool で実行されます。AppPool の ID を「NetworkService」に変更しようとしましたが、エラーは引き続き発生します。
どんな助けでも大歓迎です。