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.

Post by znmaste » Sun, 23 Jan 2005 21:28:16


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!
 
 
 

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

Post by Sidd » Thu, 27 Jan 2005 16:10:08

Hi znmaster,

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

Thanks,

Sidd [MSFT]

 
 
 

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

Post by znmaste » Thu, 27 Jan 2005 17:24:44

how can I connect to a domain? I use Win2k professinal system. Please give
me some details about it. Many thanks !
"Sidd" < XXXX@XXXXX.COM >
: XXXX@XXXXX.COM ...
 
 
 

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

Post by znmaste » Sun, 20 Feb 2005 10:15:23

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;
}
how can I connect to a domain? I use Win2k professinal system. Please give
me some details about it. Many thanks !