Web Service authentication question

  • Thread starter Thread starter Derrick
  • Start date Start date
D

Derrick

I'm going thru this tutorial -
http://samples.gotdotnet.com/quicks...l=/quickstart/aspplus/doc/secureservices.aspx

and interested in the Soap Header implementation, would like to have the web
service authenticated against a user/password table in a database, that can
be added to without someone manually going in and adding users to the box.

question is, if I use the SoapHeaders implementation, do I set the
authentication mode to none, and then trap client side for a particular
string indicating the user/pass are not correct?

Thanks in advance!

Derrick
 
Hi Derrick
Yes you can do that since implementing the soap Header is
implementing your own authentication .
If you don't use Headers however , you can still pass these values without
prompting the user by building your net work credentials and passing that
to the proxy of your service .
System.Net.NetworkCredential myCred = new
System.Net.NetworkCredential(txtuserid.Text,txtpassword.Text,txtdomain.Text)
;
System.Net.CredentialCache myCache = new System.Net.CredentialCache();
myCache.Add(new Uri(s.Url), txttype.Text, myCred);
proxy.Credentials = myCache;
hope that helps

Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 
Back
Top