c# - PrincipalContext and error Value was invalid -


i have wcf service code:

var ctx = new principalcontext(islocalmachine(strdomain) ? contexttype.machine : contexttype.domain); principal principal = principal.findbyidentity(ctx, name) 

i have 3 different test environments:

1: iis 8.5 .net v4.5 application pool, win 8.1, strdomain = "testdomen1" name = "testdomen1\testuser" - environment not have errors.

2: iis 7.5 .net v4.5 application pool, win server 2008 r2, strdomain = "testdomen1", name = "testdomen1\testuser" - - environment not have errors.

3: iis 8.5 .net v4.5 application pool, win 8, strdomain = "testdomen2" name = "testdomen2\testuser2" - environment has errors. on line

principal principal = principal.findbyidentity(ctx, name) argument exception value invalid. parameter name: sddlform  stacktrace    @ system.security.principal.securityidentifier..ctor(string sddlform) 

if use debug>breakpoint line , "add watch" or "quick watch", result. after pressing f10, got error.

what reason?


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -