我正在尝试运行一个在我的XP机器上工作正常的Web应用程序,但现在它在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
我做错了什么?我该如何解决这个问题?
答案 0 :(得分:0)
尝试使用以下方法重置机器密码:
NETDOM RESETPWD /Server:DC.Domain.tld /UserD:Administrator /PasswordD:xxx
否则退出域并使用GUI重新加入。