Я пытаюсь запустить веб-приложение, которое работало нормально на моем компьютере с XP, но теперь оно работает на Windows 7.
Когда я запускаю из компилятора, я получаю:
Server Error in '/' Application.
The trust relationship between this workstation and the primary domain failed.
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.SystemException: The trust relationship between this workstation and the primary domain failed.
Source Error:
Line 34: string username = HttpContext.Current.User.Identity.Name.ToString();
Line 35:
Line 36: bool yesno = HttpContext.Current.User.IsInRole("Group0Users");
Line 37:
Line 38: string role = GetRole.OfUser(username);
Source File: C:\Users\agordon\Documents\Visual Studio 2008\Projects\lomdb\EnterData\Global.asax.cs Line: 36
Stack Trace:
[SystemException: The trust relationship between this workstation and the primary domain failed.
]
System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, Boolean& someFailed) +1185
System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean& someFailed) +44
System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) +47
System.Security.Principal.WindowsPrincipal.IsInRole(String role) +101
EnterData.Global.Application_AuthenticateRequest(Object sender, EventArgs e) in C:\Users\agordon\Documents\Visual Studio 2008\Projects\lomdb\EnterData\Global.asax.cs:36
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5420
Икогда я публикую его в IIS и запускаю оттуда, я получаю эту ошибку:
Server Error in '/' Application.
The trust relationship between this workstation and the primary domain failed.
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.SystemException: The trust relationship between this workstation and the primary domain failed.
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.
Stack Trace:
[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
EnterData.Global.Application_AuthenticateRequest(Object sender, EventArgs e) in C:\Users\agordon\Documents\Visual Studio 2008\Projects\lomdb\EnterData\Global.asax.cs:38
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5420
Что я делаю не так?Как я могу исправить эту проблему?