Click here to Skip to main content
15,887,430 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can't call a method with parameters when opening a thread Pin
Peter Mills7-Feb-04 14:26
Peter Mills7-Feb-04 14:26 
Generalremoving registry garbages Pin
Shahin775-Feb-04 6:23
Shahin775-Feb-04 6:23 
GeneralRe: removing registry garbages Pin
Heath Stewart5-Feb-04 6:38
protectorHeath Stewart5-Feb-04 6:38 
GeneralJava vs. C# means file watcher problems Pin
RB@Emphasys5-Feb-04 6:22
RB@Emphasys5-Feb-04 6:22 
GeneralRe: Java vs. C# means file watcher problems Pin
Heath Stewart5-Feb-04 6:47
protectorHeath Stewart5-Feb-04 6:47 
GeneralRe: Java vs. C# means file watcher problems Pin
RB@Emphasys5-Feb-04 7:08
RB@Emphasys5-Feb-04 7:08 
GeneralWeb Service error Pin
Peter Greenall5-Feb-04 5:55
Peter Greenall5-Feb-04 5:55 
GeneralImpersonation and FileSystemWatcher (threading?) Pin
Bill Dean5-Feb-04 5:47
Bill Dean5-Feb-04 5:47 
Hi all,

I am not sure if this is the right place to post this...sorry in advance if it should be elsewhere:

I need a little help...here's the problem:
I am writing a windows service that runs under the localsystem account. In it's startup code it impersonates a domain user in order to gain access to files on another machine in the domain. All that works fine.

Trouble is: I try to create a set of FileSystemWatcher objects to monitor the directories on the remote machine and they fail, saying that the path is invalid. When I run the service under a domain account (not localsystem) the FileSystemWatchers work fine.

So I suspect (maybe) that the FileSystemWatchers are living in a seperate thread(s) that are running under the same login as the process started under, not the impersonated one.

Does this sound (un)reasonable to anyone? Anyone know how to get the FileSystemWatcher object to run under an impersonated identity?

Thanks in advance
Bill
GeneralRe: Impersonation and FileSystemWatcher (threading?) Pin
John Fisher5-Feb-04 6:00
John Fisher5-Feb-04 6:00 
GeneralRe: Impersonation and FileSystemWatcher (threading?) Pin
Bill Dean5-Feb-04 6:08
Bill Dean5-Feb-04 6:08 
GeneralRe: Impersonation and FileSystemWatcher (threading?) Pin
Heath Stewart5-Feb-04 6:29
protectorHeath Stewart5-Feb-04 6:29 
GeneralRe: Impersonation and FileSystemWatcher (threading?) Pin
Bill Dean5-Feb-04 6:54
Bill Dean5-Feb-04 6:54 
GeneralRe: Impersonation and FileSystemWatcher (threading?) Pin
Heath Stewart5-Feb-04 8:51
protectorHeath Stewart5-Feb-04 8:51 
GeneralRe: Impersonation and FileSystemWatcher (threading?) Pin
Bill Dean5-Feb-04 9:26
Bill Dean5-Feb-04 9:26 
GeneralRe: Impersonation and FileSystemWatcher (threading?) Pin
Bill Dean5-Feb-04 16:00
Bill Dean5-Feb-04 16:00 
GeneralComboBox in Grid Pin
H r M5-Feb-04 5:03
H r M5-Feb-04 5:03 
GeneralRe: ComboBox in Grid Pin
John Fisher5-Feb-04 5:29
John Fisher5-Feb-04 5:29 
GeneralObtaining VBA stored BLOB Values from a Database Pin
Paul Kennedy5-Feb-04 5:01
Paul Kennedy5-Feb-04 5:01 
GeneralRe: Obtaining VBA stored BLOB Values from a Database Pin
John Fisher5-Feb-04 5:40
John Fisher5-Feb-04 5:40 
GeneralRe: Obtaining VBA stored BLOB Values from a Database Pin
Heath Stewart5-Feb-04 6:14
protectorHeath Stewart5-Feb-04 6:14 
GeneralRegular Expression Help Pin
David Flores5-Feb-04 4:35
David Flores5-Feb-04 4:35 
GeneralRe: Regular Expression Help Pin
John Fisher5-Feb-04 5:50
John Fisher5-Feb-04 5:50 
GeneralRe: Regular Expression Help Pin
David Flores5-Feb-04 7:03
David Flores5-Feb-04 7:03 
Generalpdf 2 txt Pin
Mahesh Varma5-Feb-04 4:04
Mahesh Varma5-Feb-04 4:04 
GeneralRe: pdf 2 txt Pin
Heath Stewart5-Feb-04 6:07
protectorHeath Stewart5-Feb-04 6:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.