BizTalk Server General - Re: How do I set the credentials when calling Web service from biz

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > July 2005 > Re: How do I set the credentials when calling Web service from biz





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: How do I set the credentials when calling Web service from biz
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/
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com