Windows Service Applications

Slides:



Advertisements
Similar presentations
Operating Systems COMP 4850/CISG 5550 Processes Introduction to Threads Dr. James Money.
Advertisements

The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Finding and Debugging Errors
V0.01 © 2009 Research In Motion Limited Introduction to Java Application Development for the BlackBerry Smartphone Trainer name Date.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
UFCFX5-15-3Mobile Device Development Android Development Environments and Windows.
CH 13 Server and Network Monitoring. Hands-On Microsoft Windows Server Objectives Understand the importance of server monitoring Monitor server.
Microsoft ® Official Course Monitoring and Troubleshooting Custom SharePoint Solutions SharePoint Practice Microsoft SharePoint 2013.
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
Windows Services XML Web Services Certification SIG Tom Perkins.
WINDOWS SERVICES. Introduction You often need programs that run continuously in the background Examples: – servers –Print spooler You often need.
A Portable Virtual Machine for Program Debugging and Directing Camil Demetrescu University of Rome “La Sapienza” Irene Finocchi University of Rome “Tor.
Microsoft Visual Basic 2005: Reloaded Second Edition
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
PRESENTED BY: K2 blackpoint Fundamentals Module 1: Understand J SCOTT PITMAN –
 Wallace B. McClure  Scalable Development, Inc. Scalable Development, Inc. Building systems today that perform tomorrow. Designing & Building Windows.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
1.1 Introduction to Programming academy.zariba.com 1.
1 Debugging: Catching Bugs ( II ) Ying Wu Electrical Engineering & Computer Science Northwestern University EECS 230 Lectures.
VB – Debugging Tools Appendix D. Why do we need debugging? Every program has errors, and the process of finding these errors is debugging Types of errors.
Debugging Xin Tong. GDB GNU Project debugger Allows you to see what is going on `inside' another program while it executes or crashed. (Faster than printing.
11 WORKING WITH PRINTERS Chapter 10. Chapter 10: WORKING WITH PRINTERS2 THE WINDOWS SERVER 2003 PRINTER MODEL  Locally attached printers Printers that.
Debuggers in Python. The Debugger Every programming IDE has a tool called a debugger. This application does NOT locate or fix your bugs for you! It slows.
Chapter 11: Introduction to VBA Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Understanding Desktop Applications Lesson 5. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Windows Forms Applications Understand.
Slide 1. Agenda  Introduction to Windows Workflow What is it? What are activities? Hosting  Out of the box Activities  Custom Activities and Dependency.
Install a Windows Service Application Windows Development Fundamentals LESSON 3.2.
Understand Windows Services Software Development Fundamentals LESSON 5.3.
© 2006 ITT Educational Services Inc. Introduction to Computer Programming: Unit 3: Chapter 3: Slide 1 Unit 3 Formatting Chapter 3 Input, Variables, Constants,
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
Understanding Desktop Applications Lesson 5. Understanding Windows Forms Applications Windows Forms applications are smart client applications consisting.
E Copyright © 2007, Oracle. All rights reserved. Using JDeveloper.
15 Copyright © 2004, Oracle. All rights reserved. Debugging Triggers.
Intoduction to Andriod studio Environment With a hello world program.
Chapter 7 What’s Wrong with It? (Syntax and Logic Errors) Clearly Visual Basic: Programming with Visual Basic nd Edition.
1 Advanced.Net Debugging Using Visual Studio, R# and OzCode IT Week, Summer 2015.
COMPUTER PROGRAMMING I SUMMER Understand Different Types of Programming Errors.
Visual Programming Borland Delphi. Developing Applications Borland Delphi is an object-oriented, visual programming environment to develop 32-bit applications.
What's New in Visual Studio 2010 Debugging Brian Peek Senior Consultant, ASPSOFT, Inc. Microsoft MVP - C#
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
SQL Database Management
Mobile Device Development
Mobile Device Development
Chapter 2: The Visual Studio .NET Development Environment
How to debug an application
Lecture 1: Introduction to JAVA
Chapter 2: System Structures
Introduction to Triggers
Computer Programming I
1. Introduction to Visual Basic
Deploying and Configuring SSIS Packages
The Android Activity Lifecycle
Using Visual Studio with C#
DEBUGGING.
Programming Problem solving Debugging
Tonga Institute of Higher Education
CIS16 Application Development Programming with Visual Basic
Creating a Windows Forms User Interface
Activity Lifecycle Fall 2012 CS2302: Programming Principles.
HNDIT2417 Mobile Application Development
Testing, debugging, and using support libraries
CSC235 - Visual Studio Tutorial
Activity Lifecycle.
Debugging Visual Basic Programs
Creating a Windows Application Project in Visual Studio
Visual Studio Tooling Developer’s Guide to Windows 10
Code Composer Essentials 3.0
Working with events in the Edge dev tools
What is a Thread? A thread is similar to a process, but it typically consists of just the flow of control. Multiple threads use the address space of a.
Presentation transcript:

Windows Service Applications A Windows Service application consists of two parts: The application executable. The services derived from the ServiceBase class. In the application executable, you implement the Main method to control the applications services. To create any Windows Service application, you must have a class derived from the ServiceBase class. The ServiceBase class implements virtual methods for functionality required by the Service Control Manager (SCM).

Windows Service Applications A Windows Service application has the following characteristics: Does not have a UI. It is designed to run for a very long time. The execution of the Windows Service application is separate from the services execution and functionality.

Windows Service Applications You start and stop the Windows Service application executable independently of starting and stopping the service. A Windows Service application can run without a user being logged on to the machine. Typically, a Windows Service application runs under the System Account, but a specific account can be provided.

Windows Service Applications Although the executable may always be running, the service can be stopped, started, paused, or continued. The SCM uses the ServiceBase class’s OnStop, OnStart, OnPause, OnContinue, and OnShutdown (of the machine) methods to control the service’s behavior. The service can also set property values like CanStop, CanPauseAndContinue, and CanShutdown to inform the SCM which methods are supported.

Windows Service Applications Once a Windows Service application is installed, the Service Control Manager (SCM) executes the application and the Main method is run. The Main method performs any application initialization code and then creates the services within the executable.

Computer Management Console with SCM Selected

Debugging Windows Services Applications Debugging is a process of finding the cause of errors in a program, locating the lines of code that are causing those errors, and fixing those errors. Visual Studio provides a number of tools that provide a streamlined approach to debugging all kind of applications such as Windows Forms, Windows Services ,and Console Applications.

Common Debugging Mechanisms Breakpoint Quick Watch Window Watch Window Output Window Immediate Window Locals Window Call Stack Window Threads Window Memory Window

Debugging a Window Service Application A Windows Service application is always executing with one or more services running internally. To debug, you must first attach to the Windows Services application: then you will have the standard Visual Studio debugging tools available. The Attach Process is the procedure used by Visual Studio to monitor an already running executable and allow debugging.

Attach to Process Editor

Summary You learned how to create a Windows Form event, some of the common Windows Form events, and how to handle a Raised event. You learned how to create a WPF event, the differences among bubbled, tunneled, and direct WPF events, and how to handle a Raised event throughout the control hierarchy. You learned about the Windows Services application, the ServiceBase class, and how to override the ServiceBase class default methods. You learned how to debug Windows Services applications using the Attach Process Editor and the common debugging windows.