windows services xml web services certification sig tom perkins

8
Windows Services XML Web Services Certification SIG Tom Perkins

Upload: sophia-scott

Post on 25-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Windows Services XML Web Services Certification SIG Tom Perkins

Windows Services

XML Web Services Certification SIG

Tom Perkins

Page 2: Windows Services XML Web Services Certification SIG Tom Perkins

E-LEARNING XML WEB SERVICES

Chapter 2, Lessons 1 - ?

Page 3: Windows Services XML Web Services Certification SIG Tom Perkins

Reference

• Windows Services: New Base Classes in .NET Make Writing a Windows Service Easy

• Ken Getz• http://msdn.microsoft.com/msdnmag

/issues/01/12/NETServ/

Page 4: Windows Services XML Web Services Certification SIG Tom Perkins

Windows Services

• Applications (executables - .exe)• Run without user context

– Don’t have to be logged in to run– no user interface

• Provide system-level support– System event log– Telephony– Task scheduler

Page 5: Windows Services XML Web Services Certification SIG Tom Perkins

Windows Service Development

• Fairly easy in .NET; difficult in VB6 or C++

• Create a Windows Service Project – Takes care of details

• Creates a class that inherits from ServiceProcess.ServiceBase class

Page 6: Windows Services XML Web Services Certification SIG Tom Perkins

Service you create

Can provide code for:

• OnStart method

• OnStop method

• OnPause method

• OnContinue method

• OnShutdown method

Service Control

Manager (SCM)

You interact with the service

through SCM

requests

other services

methods react to requests

Page 7: Windows Services XML Web Services Certification SIG Tom Perkins

Installing the Service

• Service can’t install itself• You must provide an installer class

– Inherits from Configuration.Install.Installer

• VS Project (for each service)– Creates ServiceProcessInstaller object

• Knows how to install service with SCM

– Creates ServiceInstaller object• Writes info re service to registry

Page 8: Windows Services XML Web Services Certification SIG Tom Perkins

Get Up and Running

• Create the service project (class)• Compile .exe• Use InstallUtil to install• Control Panel Services applet

– Start the service

• Debug use the process containing the service, step thru the code