使用 Windows Auth 在 Windows 7 上使用 VS 2008 的调试 Web 服务器时,User.IsInRole 失败

发布于 2024-07-26 22:17:21 字数 409 浏览 1 评论 0原文

当从 VS2008 的 Web 服务器运行网站时调用以下行时,我收到“此工作站与主域之间的信任关系失败”。 例外。

if (User.IsInRole("SomeRole"))
...

我已经关闭了UAC,并将VS 2008(它是内置的网络服务器)设置为以管理员身份运行,并且我也将我的盒子重新加入到域中。 如果从 IIS 中的一台 Server 2003 机器调用此代码,该代码可以正常工作,并且在 Vista 中也始终可以正常工作。

关于可能导致这种情况的原因有什么想法吗?

编辑:

我刚刚尝试在本地计算机上的 IIS 7.5 中运行它,但遇到了相同的错误。 在 Windows XP 上的 IIS 5.1 和 VS 2008 Web 服务器中运行它是可行的。

When the following line is called when running a website from the VS2008's web server i get a "The trust relationship between this workstation and the primary domain failed." exception.

if (User.IsInRole("SomeRole"))
...

I have turned UAC off, and set VS 2008, and it's built-in webserver, to run as an Administrator, and i have also rejoined my box to the domain. This code works fine if called from one of my Server 2003 boxes in IIS, and it always worked fine in Vista.

Any ideas on what may be causing this?

EDIT:

I just tried running it in IIS 7.5 on my local machine and i am getting the same error. Running it on Windows XP in IIS 5.1 and in the VS 2008 webserver works.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

樱桃奶球 2024-08-02 22:17:21

你试过以管理员身份运行VS2008吗?

Have you tried running VS2008 as administrator?

思慕 2024-08-02 22:17:21

这是Win7/Server2008 R2 的一个错误。 该错误仅在连接到 Windows 2000 域时发生。

可从此处获取修补程序

This was a Win7/Server2008 R2 bug. The error only occurred when connected to a Windows 2000 domain.

Hotfix available from here

拒绝两难 2024-08-02 22:17:21

内置的Web服务器是cassini,这是一个相当有限的Web服务器。 您可能已经发现了卡西尼号所没有的功能——也许它无法执行 kerberos。 这里有更多关于卡西尼号没有什么的讨论< /a>.

The built in web server is cassini, which is a rather limited web server. You may have discovered a feature cassini doesn't have-- maybe it can't do kerberos. Here is more discussion about what Cassini doesn't have.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文