Home All Groups Group Topic Archive Search About

Console App Security Context

Author
12 Jul 2006 3:52 PM
Cuperman
Hi All,

I am calling a web service from a console app. It appears that the WS
call does not have any credentials and so fails with a 401 error.

How do i determine the account my console app is running as?
How do I reset this to run as either my account (the one I am logged in
with) or a specified account (login / password combo)?

Many thanks,
Mark

Author
12 Jul 2006 4:07 PM
Dominick Baier
Hi,

you can set the credentials on the client proxy using the Credentials property.

For using your current windows identity, set the UseDefaultCredentials property
to true (2.0 only)


Show quoteHide quote
> Hi All,
>
> I am calling a web service from a console app. It appears that the WS
> call does not have any credentials and so fails with a 401 error.
>
> How do i determine the account my console app is running as?
> How do I reset this to run as either my account (the one I am logged
> in
> with) or a specified account (login / password combo)?
> Many thanks,
> Mark