Hey,
I am trying to work out an ssl - certificate site. This time the company has some real bought certificates so i am good to go this field.
What i want to ask is about the above code. I am thinking of implementing TransportWithMessageCredential with clientCredentialType="UserName" so already set security and no custom user-pass security level. I have seen tons of samples and to my surprise, not many will mention how the client will set the username pass security up. After downloading a MS sample and searching through hundreds of directories (actually i search for TransportWithMessageCredential with a tool) i found a "working sample" it used system.servicemodel.description.clientcredentials to pass fake creds (i will fix that) and it continues normally.
2 things here
1)I've read that client creds only needed as "fakes" for the aforementioned WCF service. Regardless on if i will use the creds correctly afterwards, is this the "basic" behavior?
2)I get to a point that:
GetCallerIdentity will produce the following issue:
"An error occurred while making the HTTP request to https://localhost/servicemodelsamples/service.svc. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server."
Is this an issue with the "fake" cert MS sample use or something else?
and
Thanks.
Code:
<security mode ="TransportWithMessageCredential">
<message clientCredentialType="UserName" />
What i want to ask is about the above code. I am thinking of implementing TransportWithMessageCredential with clientCredentialType="UserName" so already set security and no custom user-pass security level. I have seen tons of samples and to my surprise, not many will mention how the client will set the username pass security up. After downloading a MS sample and searching through hundreds of directories (actually i search for TransportWithMessageCredential with a tool) i found a "working sample" it used system.servicemodel.description.clientcredentials to pass fake creds (i will fix that) and it continues normally.
2 things here
1)I've read that client creds only needed as "fakes" for the aforementioned WCF service. Regardless on if i will use the creds correctly afterwards, is this the "basic" behavior?
2)I get to a point that:
Code:
client.ClientCredentials.UserName.UserName = username
client.ClientCredentials.UserName.Password = password.ToString()
' Call the GetCallerIdentity service operation
Console.WriteLine(client.GetCallerIdentity())
"An error occurred while making the HTTP request to https://localhost/servicemodelsamples/service.svc. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server."
Is this an issue with the "fake" cert MS sample use or something else?
and
Code:
Public Function GetCallerIdentity() As String Implements ICalculator.GetCallerIdentity
' use ServiceSecurityContext.WindowsIdentity to get the name of the caller
Return ServiceSecurityContext.Current.WindowsIdentity.Name
End Function