all groups > dotnet web services enhancements > january 2005 >
You're in the

dotnet web services enhancements

group:

The sample of Kerberos can't run:The Kerberos credential handle could not be acquired.


The sample of Kerberos can't run:The Kerberos credential handle could not be acquired. znmaster
1/22/2005 8:28:16 PM
dotnet web services enhancements:
After I set up WSE2, I ran the sample of "Kerberos" in the folder
QuickStart. I got an exception System.Security.SecurityException: The
Kerberos credential handle could not be
acquired. The AcquireCredentialsHandle call returned the following error
code....

I use Win2k professinal system under WORKGROUP mode.
I debug the program step by step, and got the value of each
variable(displayed at the end of each line use //)

KerberosToken GetSecurityToken()
{
string remoteHost =
ConfigurationSettings.AppSettings["remoteHost"]; // null
string remoteDomain =
ConfigurationSettings.AppSettings["remoteDomain"]; //null

string remoteHostName = System.Net.Dns.GetHostName(); //
remoteHostName is "znmaster"

if ( remoteHost != null && remoteHost.Length > 0 )
{
remoteHostName = (new Uri(remoteHost)).Host;
}

string targetPrincipalName = null;

if ( remoteDomain == null || remoteDomain.Length == 0 )
{
targetPrincipalName = "host/" + remoteHostName; //
targetPrincipal Name is host/znmaster
}
else
{
targetPrincipalName = "host/" + remoteHostName + "@" +
remoteDomain;
}

KerberosToken securityToken = new
KerberosToken(targetPrincipalName); // error occured here

return securityToken;
}

Please help me. How can I run this sample! Thank you!

Re: The sample of Kerberos can't run:The Kerberos credential handle could not be acquired. Sidd
1/25/2005 11:10:08 PM
Hi znmaster,

You need to be connection to a domain to get a Kerberos token in order
to run this sample

Thanks,

Sidd [MSFT]

[quoted text, click to view]

Re: The sample of Kerberos can't run:The Kerberos credential handle could not be acquired. znmaster
1/26/2005 4:24:44 PM
how can I connect to a domain? I use Win2k professinal system. Please give
me some details about it. Many thanks !
"Sidd" <ElCid@hotmail.com> дÈëÏûÏ¢ÐÂÎÅ
:uL0PSY3AFHA.3504@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button