User.IsInRole error when using the VS 2008 debugging web server in Windows 7 using Windows Auth

When the following line is called when starting the website from the VS2008 web server, I get "Invalid trust relationship between this workstation and the primary domain." an exception.

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

I disabled UAC and installed VS 2008, as well as a built-in web server to run as an administrator, and I also joined my box for the domain. This code works great when called from one of my Server 2003 servers in IIS, and it always worked fine in Vista.

Any ideas on what could be causing this?

EDIT:

I just tried running it in IIS 7.5 on my local computer and I get the same error. Running it on Windows XP in IIS 5.1 and running on the VS 2008 web server.

+3
source share
3 answers

It was a Win7 / Server2008 R2 error. The error occurred only when connecting to a Windows 2000 domain.

The fix is โ€‹โ€‹available here.

+1
source

Have you tried running VS2008 as an administrator?

+1
source

The embedded web server is cassini, which is a fairly limited web server. You may have discovered a cassini feature that does not - perhaps it cannot do kebero. Here's a more discussion of what Cassini didn't have .

0
source

Source: https://habr.com/ru/post/1712731/


All Articles