Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to give authentication for a service call by using username and password, so that clients can use my secured service call.
Posted

1 solution

I wouldn't consider basic auth to be "secured". If you google "asp.net webapi basic authentication" you'll find various articles with code samples. As well as supporting it at the server-end, your client needs to add the Authorization header described below;

Code Inside Blog | Using Basic Authentication in ASP.NET WebAPI[^]

Basic Authentication in ASP.NET Web API | The ASP.NET Site[^]
 
Share this answer
 
Comments
karthik_r 21-Jan-16 6:33am    
thank you and one more question,what credentials i need to give ? is it server?
F-ES Sitecore 21-Jan-16 6:35am    
You need to give the username and password of an account that exists on the server that has the required access to the site. Any valid account should do.
karthik_r 21-Jan-16 6:42am    
okay thanks

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