| Prasad 2005-07-28, 5:52 pm |
| Here is a sample snippet of assigning Credentials.
// Create Web Service object.
myWS = new WebSerice();
myWS.PreAuthenticate = true;
myWS.Credentials = System.Net.CredentialCache.DefaultCredentials;
You can use this NetworkCredential class to deal with Network Credentials.
You do not have to hard code any user details. That's bad approach.
Hope this helps.
--Prasad
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tomas Restrepo (MVP)" wrote:
> okaminer,
>
>
> That's a valid way as well. But, what happens when the username or password
> changes? You'll have to recompile and redeploy the orchestration assembly,
> and that's a lot of work. By setting it in the port configuration, you'll be
> able to change it using administrative tools, without having to go through
> all the hassle of updating and redeploying the updated assembly.
>
> BTW: you really should never post the actual username and password in the
> newsgroups 
>
>
> --
> Tomas Restrepo
> tomasr@mvps.org
> http://www.winterdom.com/
>
>
>
|