Kerberos Token is not created

Joined
Mar 3, 2017
Messages
1
Reaction score
0
Public Void Method1()

{

Service1 serviceProxy = new Service1();

serviceProxy.UseDefaultCredentials = true;

serviceProxy.RequireMtom = true;




KerberosAssertion assertion = new KerberosAssertion();


KerberosToken token = GetSecurityToken();



assertion.EstablishSecurityContext = false;

assertion.RenewExpiredSecurityContext = true;

assertion.RequireSignatureConfirmation = false;

assertion.MessageProtectionOrder = MessageProtectionOrder.SignBeforeEncrypt;

assertion.RequireDerivedKeys = true;

assertion.TtlInSeconds = 300;

assertion.Protection.Request.SignatureOptions = Microsoft.Web.Services3.Security.SignatureOptions.IncludeAddressing;

assertion.Protection.Request.SignatureOptions = Microsoft.Web.Services3.Security.SignatureOptions.IncludeTimestamp;

assertion.Protection.Request.SignatureOptions = Microsoft.Web.Services3.Security.SignatureOptions.IncludeSoapBody;

assertion.Protection.Request.EncryptBody = true;

assertion.Protection.Response.SignatureOptions = Microsoft.Web.Services3.Security.SignatureOptions.IncludeAddressing;

assertion.Protection.Response.SignatureOptions = Microsoft.Web.Services3.Security.SignatureOptions.IncludeTimestamp;

assertion.Protection.Response.SignatureOptions = Microsoft.Web.Services3.Security.SignatureOptions.IncludeSoapBody;

assertion.Protection.Response.EncryptBody = true;

assertion.Protection.Fault.SignatureOptions = Microsoft.Web.Services3.Security.SignatureOptions.IncludeAddressing;

assertion.Protection.Fault.SignatureOptions = Microsoft.Web.Services3.Security.SignatureOptions.IncludeTimestamp;

assertion.Protection.Fault.SignatureOptions = Microsoft.Web.Services3.Security.SignatureOptions.IncludeSoapBody;

assertion.Protection.Fault.EncryptBody = false;







serviceProxy.SetClientCredential(token);



Policy policy = new Policy();

policy.Assertions.Add(assertion);

serviceProxy.SetPolicy(policy);



string str = serviceProxy.HelloWorld();

}

KerberosToken GetSecurityToken()

{





KerberosToken securityToken = new KerberosToken(“host/INBLRN0143”, ImpersonationLevel.Impersonation);



return securityToken;

}

But what happened, When I Debug the line KerberosToken token = GetSecurityToken();

and see the token object in watch window, Key through the exception

Key = 'securityToken.Key' threw an exception of type 'System.ArgumentException'

But after refreshing the token object, it create the key


Key = {Microsoft.Web.Services3.Security.Cryptography.AES128}

I don't understand why this kind of error is coming.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,818
Messages
2,569,732
Members
45,691
Latest member
Dick331194

Latest Threads

Top