Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
binding : wsHttpBinding
security mode: Message
Client Credentials : Username
Server certificate : yes

I know how to consume from Desktop app. like...

ServiceReference1.Service1Client jc = new ServiceReference1.Service1Client ();
jc.ClientCredentials.UserName.UserName = "a";
jc.ClientCredentials.UserName.Password = "a";
jc.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
Console.WriteLine(jc.GetData());


but want to know how to cosume from asp.net or MVC web app????

Thanks...
Posted

1 solution

Consuming WFC service is not developing such service; it does not matter in what application do you consume it, in ASP.NET or anything else. Please start, for example, here: http://msdn.microsoft.com/en-us/library/bb332338.aspx#msdnwcfhc_topic6[^].

—SA
 
Share this answer
 
Comments
hjCoder 16-May-13 1:05am    
Thanks Serge, but my problem is in desktop app Service1Client is the proxy and through this obj i can submit Username,Password for custom UsernamePasswordValidation class inherited from System.IdentityModel.Selectors.UserNamePasswordValidator.but through web app proxy object can't sent username or password to that class
Sergey Alexandrovich Kryukov 16-May-13 1:15am    
Yes, you need to implement authentication...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900