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

From: znmaster (zengniu2001_at_hotmail.com)
Date: 01/22/05


Date: Sat, 22 Jan 2005 20:28:16 +0800

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!



Relevant Pages

  • The sample of Kerberos cant run:The Kerberos credential handle could not be acquired.
    ... I ran the sample of "Kerberos" in the folder ... The AcquireCredentialsHandle call returned the following error ... I use Win2k professinal system under WORKGROUP mode. ... remoteHostName is "znmaster" ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: UserName and Kerberos tokens at the same time
    ... \par Subject: Re: UserName and Kerberos tokens at the same time ... \par If I run the example Kerberos solution I get some a detailed error message: ... \par> there I get the following exception ... \par> But when I run my test project which is using a custom policy I get the ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: UserName and Kerberos tokens at the same time
    ... If I run the example Kerberos solution I get some a detailed error message: ... Microsoft.Web.Services3.Security.SecurityFault: An invalid security token ... AcceptSecurityContext call failed with the following error message: ... > there I get the following exception ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • KerberosToken constructor gives error - Kerberos credential handle could not be returned
    ... I am tryin to work with Web Service Enhancement 2.0 to use Kerberos ... I have Windows XP SP2 installed on my m/c which is connected in ... error code: The parameter is incorrect." ... I also tried investigating AcquireCredentialsHandle, ...
    (microsoft.public.security)
  • Re: KerberosToken2 Error Question
    ... I've run SETSPN to make sure I have an SPN that matches ... The Kerberos credential handle could not be ... The AcquireCredentialsHandle call returned the following error ... > Dominick Baier - DevelopMentor ...
    (microsoft.public.dotnet.framework.webservices.enhancements)