<script type="text/javascript">
function GetAuthor() {
Authors.GetAuthor(document.getElementById("MainContent_TextBoxAuthorId").value, FinishCallback);
}
</script>
function FinishCallback(result) {
...
}
Use one of standard ASP.NET security methods.
Similar to securing any other ASP.NET resources.
Alternatively use Web Services Enhancements (WSE) 3.0 to secure web services.
To pass basic authentication credentials first create instance of NetworkCredentials class to contain user name, password and domain information.
Create CredentialCache object to which the NetworkCredentials instance is added.
Set web service proxy Credentials property to the CredentialCache object just created.
If using Windows Integrated Security set Credentials property to System.Net.CredentialCache.DefaultCredentials.