c# - WCF Using UserName Authentication with Message Security -
I am developing an ASP.NET application that will be calling (widely) WCF services. Now, I'm clearly melting in some kind of mentality because for my life, I can not wrap it around my head.
I am using ws2007 HTPBI bidding with message security and client credential type along with the user's name. WCF is using ASP.NET subscription provider to validate user credentials.
All this works well but I have to explicitly add user details in the call:
Var service = new MyService.MyServiceClient (); Service.ClientCredentials.UserName.UserName = "my_username"; Service.ClientCredentials.UserNane.Password = "mypassword"; .... etc ... service. Close ();
Now, from the login page, this is easy because the user has given us his username and password just now when I need to call any other service with the user's credentials. I am not comfortable in accumulating passwords for use later on the road.
Am I clarifying something? I have read about tokens etc., but I'm not completely sure how I should go about implementing this kind of thing. I have spent the whole day searching and reading and I am still unsure, so whatever help You can give it, it will be highly appreciated!
The easiest way to store passwords in a custom indenture can actually be. In an ideal world, you will use examples to see more information about Carbos and Delegation Cloning and Delegation.
Very good article:
But it does not work with all the membership providers. You need Windows authentication with an Active Directory.
This topic is not very easy ... just as an idea: Are you actually logged on to the web service credentials user?
HTH a little bit, Alex
Comments
Post a Comment