I have a webservice in asmx which contains insert, delete, update, select functions, I'm consuming it via ajax, because my application can not work server side. My question is how can I provide authentication to connect to this webservice? I got to put Login and password in each function but in javascript and html can not hide this password, I will have to pass via parameters to access and then anyone who sees the code of the page can see the login and password. Searching the stack I found this link link , but no I managed to understand how it works inside my webservice