|
-
Aug 1st, 2002, 04:58 AM
#1
Thread Starter
Lively Member
Security on Webservice?
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!
________________________
Fredrik Klarqvist
-
Aug 1st, 2002, 08:39 AM
#2
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.
-
Jun 23rd, 2005, 05:20 AM
#3
Addicted Member
Re: Security on Webservice?
Hello..
I'm looking how to get the username from the client.
I use following code:
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
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..
any suggestions?
nickname
Software Engineer
DBA
Webdesigner
--
to code or to be coded, that's the question
-
Jun 23rd, 2005, 09:01 AM
#4
Re: Security on Webservice?
Ah, you want the windows credentials? You should set the DefaultCredentials object's properties in that case.
-
Jun 23rd, 2005, 09:08 AM
#5
Addicted Member
Re: Security on Webservice?
 Originally Posted by mendhak
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?
tnx in advance
nickname
Software Engineer
DBA
Webdesigner
--
to code or to be coded, that's the question
-
Jun 23rd, 2005, 09:23 AM
#6
Re: Security on Webservice?
VB Code:
webserviceclass.Credentials = System.Net.CredentialCache.DefaultCredentials;
Try that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|