dotnet web services enhancements:
Hi,
Please help me solve this problem.. This is very urgent, i have to
demo it tommorrow and need to fix it before tomorrow..
I am using WS Secure Conversation and am using a USername Token to
sign the request for a initial request from the client to tokenissuer
for securitycontexttoken.
I would like to encrypt the UsernameToken before sending it across.
My code patch is as below:
SecurityToken token = new UsernameToken(t_username.Text,
t_password.Text,
PasswordOption.SendPlainText);
// Create a SecurityContextTokenServiceClient that will get the
SecurityContextToken
string secureConvEndpoint =
ConfigurationSettings.AppSettings["tokenIssuer"];
SecurityContextTokenServiceClient client = new
SecurityContextTokenServiceClient(new Uri( secureConvEndpoint ));
// retrieve server's cert
SecurityToken issuerToken = GetServerTokenForEncryption();
// Sign the security token request.
client.RequestSoapContext.Security.Elements.Add( new EncryptedData(
issuerToken, string.Format("#{0}",token.Id )) );
// Request the token, use the signing token as the Base
SecurityContextToken sct =
client.IssueSecurityContextTokenAuthenticated(token, issuerToken);
But somehow I am not able to access the RequestSoapContext of the
client proxy.
It gives me error:
'Microsoft.Web.Services2.Security.SecurityTokenServiceClient.RequestSoapContext'
is inaccessible due to its protection level
I cannot send the password as hashed because I am authenticating
against ADAM hence password has to go as plain text.
Can someone tell me how I can access the RequestSoapConext of the
proxy so that I can encrypt the usernametoken that is carried in the
SOAP Header to the token issuer.
Please help me.. I have an urgent demonstration to show tommorrow and
need to get it work.
PLEASE PLEASE HELP ME...
Regards,