logo       

RE: Cannot Control a Service - Access Denied - WHAT?: msg#00119

Subject: RE: Cannot Control a Service - Access Denied - WHAT?
OnSessionChange has something to do with Terminal Services.

My question is what user do you have this service running under? From your
error it sounds like your tying to access some database from your service.

-Luke

 

-----Original Message-----
From: padnug@xxxxxxxxxxxxxxx [mailto:padnug@xxxxxxxxxxxxxxx] On Behalf Of
John P. Greiner
Sent: Monday, June 26, 2006 8:21 AM
To: padnug@xxxxxxxxxxxxxxx
Subject: [padnug] Cannot Control a Service - Access Denied - WHAT?

Hello all, hope you were able to stay cool this weekend.  I figure the only
reason to come to work today is for the free air conditioning!

 

On to business:

 

I have written a service that I now need to write some sort of
administration program for.  In my service, I have created an event log
which for now I am using as my debugger.  I have overridden all of the
standard stuff: OnStart, OnStop, OnContinue, OnCustomCommand, OnPause,
OnShutDown, OnSessionChange <-- Don't know what this is.

 

In my Admin Project I have a simple form that, using a Service Controller
can Stop, Start, Pause and Resume the service, but when I try to send the
service a custom command I get the error: Cannot control DBAuthentication
service on computer '.'.  The exception details are
below:

 

System.InvalidOperationException was unhandled

  Message="Cannot control DBAuthentication service on computer '.'."

  Source="System.ServiceProcess"

  StackTrace:

       at System.ServiceProcess.ServiceController.ExecuteCommand(Int32
command)

       at
Database_Authentication_Admin.Form1.cmdSendCommand_Click(Object sender,
EventArgs e) in C:\Documents and Settings\jgreiner\My Documents\Visual
Studio 2005\Projects\Database Authentication Admin\Database Authentication
Admin\Form1.cs:line 124

       at System.Windows.Forms.Control.OnClick(EventArgs e)

       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)

       at System.Windows.Forms.Control.WndProc(Message& m)

       at System.Windows.Forms.ButtonBase.WndProc(Message& m)

       at System.Windows.Forms.Button.WndProc(Message& m)

       at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)

       at
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.U
nsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)

       at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)

       at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)

       at Database_Authentication_Admin.Program.Main() in C:\Documents and
Settings\jgreiner\My Documents\Visual Studio 2005\Projects\Database
Authentication Admin\Database Authentication Admin\Program.cs:line 17

       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)

       at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)

       at System.Threading.ThreadHelper.ThreadStart()

 

My question(s) are:

 

Is there something wrong with my service or with my Admin Program?

How can I fix this?

 

Thanks in advance,

 

John P. Greiner

Key Knife, Inc.

503.403.2013

 

PLEASE DO NOT read, copy, or disseminate this communication unless you are
the intended addressee. This e-mail communication may contain confidential
and/or privileged information intended only for the addressee. If you have
received this communication in error, please contact Key Knife, Inc. at
503-403 2000 for North America, or +43 7442/ 53350 for Europe.
Also, please notify the sender immediately via e-mail, by replying to this
message, that you have received the communication in error.
Thank you.


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~-->
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/dpFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links



 







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/dpFolB/TM
--------------------------------------------------------------------~-> 

 


<Prev in Thread] Current Thread [Next in Thread>