Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - NegotiateStream delegation problem

Reply
 
Old 08-13-2009   #1 (permalink)
DAXU


 
 

NegotiateStream delegation problem

Hello,
I have following code from client: (it is just a test app)
using (

System.Security.Principal.WindowsImpersonationContext wic =
System.Security.Principal.WindowsIdentity.GetCurrent().Impersonate())
{
System.Net.ICredentials creds =
System.Net.CredentialCache.DefaultCredentials;


// need a full duplex stream - loopback is easiest
way to get that


using (NegotiateStream clientSide = new
NegotiateStream(new TcpClient(server,
port).GetStream()))
{
clientSide.AuthenticateAsClient
(System.Net.CredentialCache.DefaultNetworkCredentials,
"", ProtectionLevel.EncryptAndSign,
TokenImpersonationLevel.Delegation);
}
}

Server side has SPN set and active directory attributes set and has
the same settings as client (encryptandsign and require delegation),
but when I run it, I got this error:
The client side:
A remote side security requirement was not fulfilled during
authentication. Try increasing the ProtectionLevel and/or
ImpersonationLevel.
The server side error is:
A security requirement was not fulfilled during authentication.
Required: Delegation, negotiated: Impersonation.

If I change the ImpersonationLevel to impersonate, no error will be
thrown out. I suspect it is because I use
System.Security.Principal.WindowsIdentity.GetCurrent().Impersonate(),
instead of using username and password to do a logon. But I really
want to just use windowsIdentity to achieve delegation, as delegation
will be definitely required. Is it possible and can someone give me
some help?

Many Thanks

Jerry

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
NegotiateStream.AuthenticateAsClient problem? .NET General
Re: CredSSP and kerberos credentials delegation Vista security
RDP/TS Single-sign-on with credentails delegation Vista security
SQL + IIS Delegation woes .NET General
View delegation permissions of OU PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46