Когда я запускаю простое консольное приложение, которое вызывает UserPrincipal.GetGroups, оно без проблем перечисляет группы пользователей. Однако, когда я запускаю тот же код, что и тот же пользователь, на том же сервере, но из службы Windows, на которой размещается WCF, я получаю следующую цепочку ошибок:
Message : The socket transfer timed out after 00:00:10. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout.
Inner Exception
---------------
Message : The read operation failed, see inner exception.
Inner Exception
---------------
Message : The socket transfer timed out after 00:00:10. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout.
Inner Exception
---------------
Message : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Может ли это быть как-то связано с олицетворением потока WCF? WindowsIdentity.GetCurrent().Name
возвращает того же пользователя, однако Thread.CurrentPrincipal.Identity.Name
отличается - пустая строка в случае консольного приложения, но олицетворенный пользователь WCF в случае службы Windoes.