Re: C# windows service blues
From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: 07/06/05
- Next message: cvg: "Re: Act as part of the operating system for ASPNET - a bad idea???"
- Previous message: Panayotis: "C# windows service blues"
- In reply to: Panayotis: "C# windows service blues"
- Next in thread: Panayotis: "Re: C# windows service blues"
- Reply: Panayotis: "Re: C# windows service blues"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 05 Jul 2005 23:56:20 -0700
Hello Panayotis,
so - i guess this proxy does windows integrated authentication.
Are you using HttpWebRequest for downloading??
This class has a .Proxy property where you can set the proxy.
The WebProxy class in turn has a .Credentials property.
To authenticate against the proxy using windows auth you set
proxy.Credentials = CredentialCache.DefaultCredentials;
and assign the proxy to the webrequest
that should do the trick.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> Hi,
>
> I have created a web service using C# that needs to check whether some
> XML files are updated, if they are, it downloads them (saves them to
> disk) and processes them by updating data in a back-end MS SQL
> database.
>
> The client has a proxy server installed on their network and they
> request that the windows service be run under a low privileged account
> that will only be able to download the XML files through the proxy as
> well as insert/update/delete data in the MS SQL database.
>
> In addition, they do not want to store the proxy info (server name,
> username, password and domain) to a file, even in encrypted form, but
> they request that the windows service should "automagically" download
> the files via the proxy server by retrieving the SID token of the user
> account under which the windows service will be run from time to time.
>
> I am no expert in this, so I do not know if it is doable. How can I
> retrieve the SID of the currently "service user account" in order to
> present the appropriate network credentials to the proxy server and
> download the files ?
>
> Can anyone give any pointers, code examples, anything really ?
>
> Clueless,
> Thank you for your help.
- Next message: cvg: "Re: Act as part of the operating system for ASPNET - a bad idea???"
- Previous message: Panayotis: "C# windows service blues"
- In reply to: Panayotis: "C# windows service blues"
- Next in thread: Panayotis: "Re: C# windows service blues"
- Reply: Panayotis: "Re: C# windows service blues"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|