Click here to Skip to main content
15,907,497 members
Home / Discussions / C#
   

C#

 
GeneralRe: Monitoring an object Pin
Mauricio Ritter18-Dec-02 3:36
Mauricio Ritter18-Dec-02 3:36 
GeneralRe: Monitoring an object Pin
Jeff J18-Dec-02 17:28
Jeff J18-Dec-02 17:28 
GeneralRe: Monitoring an object Pin
Mauricio Ritter18-Dec-02 23:23
Mauricio Ritter18-Dec-02 23:23 
QuestionRuning a run window in os? Pin
imran_rafique17-Dec-02 23:17
imran_rafique17-Dec-02 23:17 
AnswerRe: Runing a run window in os? Pin
Kannan Kalyanaraman18-Dec-02 2:02
Kannan Kalyanaraman18-Dec-02 2:02 
AnswerRe: Runing a run window in os? Pin
Gaul19-Dec-02 17:59
Gaul19-Dec-02 17:59 
Generalprinting crystal report Pin
sharon17-Dec-02 22:21
sharon17-Dec-02 22:21 
GeneralRe: printing crystal report Pin
OBRon23-Dec-02 9:07
OBRon23-Dec-02 9:07 
GeneralRe: printing crystal report Pin
sharon23-Dec-02 21:23
sharon23-Dec-02 21:23 
GeneralRe: printing crystal report Pin
OBRon26-Dec-02 4:05
OBRon26-Dec-02 4:05 
QuestionHow can You auto detect when a CD is inserted in the CDRom Drive ? Pin
cutesquirrel17-Dec-02 20:58
cutesquirrel17-Dec-02 20:58 
AnswerRe: How can You auto detect when a CD is inserted in the CDRom Drive ? Pin
cutesquirrel17-Dec-02 22:43
cutesquirrel17-Dec-02 22:43 
GeneralSystemColors.HighlightText returns White Pin
Jonathan Austin17-Dec-02 16:10
Jonathan Austin17-Dec-02 16:10 
GeneralRe: SystemColors.HighlightText returns White Pin
Roger Alsing17-Dec-02 20:53
Roger Alsing17-Dec-02 20:53 
GeneralBringing up a Web Browser (beginner) Pin
Adrian Hall17-Dec-02 14:37
Adrian Hall17-Dec-02 14:37 
GeneralRe: Bringing up a Web Browser (beginner) Pin
Kannan Kalyanaraman17-Dec-02 18:17
Kannan Kalyanaraman17-Dec-02 18:17 
GeneralRe: Bringing up a Web Browser (beginner) Pin
Daniel Turini17-Dec-02 23:49
Daniel Turini17-Dec-02 23:49 
GeneralRe: Bringing up a Web Browser (beginner) Pin
Adrian Hall18-Dec-02 5:53
Adrian Hall18-Dec-02 5:53 
Generalservice Pin
imran_rafique17-Dec-02 11:07
imran_rafique17-Dec-02 11:07 
GeneralRe: service Pin
SimonS17-Dec-02 19:04
SimonS17-Dec-02 19:04 
GeneralRe: service Pin
imran_rafique17-Dec-02 21:41
imran_rafique17-Dec-02 21:41 
GeneralRe: service Pin
Rein Hillmann19-Dec-02 21:16
Rein Hillmann19-Dec-02 21:16 
GeneralRe: service Pin
imran_rafique20-Dec-02 0:19
imran_rafique20-Dec-02 0:19 
GeneralRe: service Pin
Rein Hillmann20-Dec-02 6:00
Rein Hillmann20-Dec-02 6:00 
OK, you have two problems here:

1) Services running under a user account can not interact with the desktop since this can lead to elevation of privilege. So to interact with the desktop, the service needs to run as the local system account.
2) The local system account does not have access to any network resources and that's why you're getting the error.

It's a tough call on how to fix this. The easiest way would be to remove any interaction with the desktop from the service. Put the desktop code into a seperate application that is launched by the user that is logged in. Have that application communicate with the service somehow to let the service know what it should do.

An example of this is an AntiVirus application. The service is seperate from the application used to control the service. They are actually two seperate .exe files. The controlling application sets some registry settings (for example) which the service polls.
QuestionDataGrid Disable Button or Cancel ShowParentDetailsButtonClick Event? Pin
RichB17-Dec-02 8:14
RichB17-Dec-02 8:14 

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.