I want to create a webservice where the user (the one accessing the webservice) must use a username and password to access it.
Does anyone have any experience of this and how it can be done?
Thanks in advance!
Printable View
I want to create a webservice where the user (the one accessing the webservice) must use a username and password to access it.
Does anyone have any experience of this and how it can be done?
Thanks in advance!
You just call a login function thta returns wether the logon was successful or not passing the username and password as parameters. Works just like calling any other function on your client.
Hello..
I'm looking how to get the username from the client.
I use following code:
But it only works when I run it on my developing machine. When i run it from the server it wont take the usernamen from the visitor..Code:Dim objWinId As System.Security.Principal.WindowsIdentity=System.Security.Principal.WindowIdentity.GetCurrent
Dim strUserName() As String = Split(objWinId.Name, "\")
Dim sUsername As String = strUserName(1).ToLower
Me.txtPersoon.Text = sUsername
any suggestions?
nickname
Ah, you want the windows credentials? You should set the DefaultCredentials object's properties in that case.
and where can I conigure the DefaultCredentials object's properties?Quote:
Originally Posted by mendhak
:confused:
tnx in advance
nickname
VB Code:
webserviceclass.Credentials = System.Net.CredentialCache.DefaultCredentials;
Try that.