 Wallace B. McClure  Scalable Development, Inc. Scalable Development, Inc. Building systems today that perform tomorrow. Designing & Building Windows.

Slides:



Advertisements
Similar presentations
By Sam Nasr Nasr Information Systems May 14, 2013.
Advertisements

Visual Basic.NET A look into the.NET Programming Model Bryan Jenks Integrated Ideas ©2005.
Basics of ASP.NET. 2 © UW Business School, University of Washington 2004 Outline Installing ASP.NET and Web Matrix Data Types Branching Structure Procedures.
CSE3030Lecture 11 Know Your User The First Slogan.
WNT Client/Server SDK Tony Vaccaro CS699 Project Presentation.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Creating a Console Application with Visual Studio
Visual Basic.NET A look into the.NET Programming Model Bryan Jenks Integrated Ideas ©2005.
Windows Programming Using C# Windows Services, Serialization, and Isolated Storage.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Overview of Microsoft.Net and Vb.Net ITSE 2349 Spring 2002 Material from Microsoft.Net an Overview for ACC faculty by Stuart Laughton and Introduction.
Windows Services XML Web Services Certification SIG Tom Perkins.
9-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 2: The ASP.Net Template Dave.
Overview of SQL Server Alka Arora.
WINDOWS SERVICES. Introduction You often need programs that run continuously in the background Examples: – servers –Print spooler You often need.
Introduction to .Net Framework
Overview of ADO.NET Whidbey  Wallace B. McClure  Scalable Development, Inc. Scalable Development, Inc. Building systems today that perform tomorrow.
Eric Vogel Software Developer A.J. Boggs & Company.
ASP.NET The.NET Framework. The.NET Framework is Microsoft’s distributed run-time environment for creating, deploying, and using applications over the.
Architecture of.NET Framework .NET Framework ٭ Microsoft.NET (pronounced “dot net”) is a software component that runs on the Windows operating.
.NET Overview. 2 Objectives Introduce.NET –overview –languages –libraries –development and execution model Examine simple C# program.
Meir Botner David Ben-David. Project Goal Build a messenger that allows a customer to communicate with a service provider for a fee.
C# A 1 CSC 298 Introduction to C#. C# A 2 What to expect in this class  Background: knowledge of an object oriented language of the C++, Java, … family.
Native Support for Web Services  Native Web services access  Enables cross platform interoperability  Reduces middle-tier dependency (no IIS)  Simplifies.
Introduction to .NET Rui Ye.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
ASP.NET  ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required.
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
Cognos TM1 Satya Mobile:
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC BUILDING BLOCKS Bilal Munir Mughal 1 Chapter-5.
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
Developing Reporting Solutions with SQL Server
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Overview of Threading with the.NET Framework  Wallace B. McClure  Scalable Development, Inc. Scalable Development, Inc. Building systems today that perform.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Programming with Visual Web Developer Chapter 9.
.NET Framework Danish Sami UG Lead.NetFoundry
Introduction to the Adapter Server Rob Mace June, 2008.
Introduction to ASP.NET T.Ahlam Algharasi. The Visual Studio IDE Start page 2.
Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
Module 2: Using Microsoft Visual Studio.NET. Overview Overview of Visual Studio.NET Creating an ASP.NET Web Application Project.
Applications Development
What is Programming? Computer programming is about telling the computer what it is we want it to do We tell the computer what we want it to do by sending.
Intro to dot Net Dr. John Abraham UTPA CSCI 3327.
DBA331 Managing a Microsoft SQL Server 2000 Reporting Services Implementation Brian Welcker Group Program Manager SQL Server Microsoft Corporation.
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.
DEV332 Programming for the Middle Tier in Visual Basic.NET Billy Hollis Author / Consultant.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
Understanding Desktop Applications Lesson 5. Understanding Windows Forms Applications Windows Forms applications are smart client applications consisting.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Module 14: Advanced Topics and Troubleshooting. Microsoft ® Windows ® Small Business Server (SBS) 2008 Management Console (Advanced Mode) Managing Windows.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
 Cloud Computing technology basics Platform Evolution Advantages  Microsoft Windows Azure technology basics Windows Azure – A Lap around the platform.
MQ Series Cross Platform Dominant Messaging sw – 70% of market
Windows Communication Foundation and Web Services
MeshCentral 2.0.
Introduction to .NET Framework Ch2 – Deitel’s Book
VISUAL BASIC.
CSE 154 Lecture 22: AJAX.
Deepak Shenoy Agni Software
MQ Series Cross Platform Dominant Messaging sw – 70% of market
Windows Service Applications
A look into the .NET Programming Model
Presentation transcript:

 Wallace B. McClure  Scalable Development, Inc. Scalable Development, Inc. Building systems today that perform tomorrow. Designing & Building Windows Services with VB.NET

.NET Experiences  PDC 2000 Build (July 2000).  Visual Studio 1.0 Beta 1 (November 2000).  Book began (January 2001).  Visual Studio 1.0 Beta 2 (June 2001).  First Production ASP.NET App (July 2001).  Production Windows Service (November 2001). Runs today.  4 Production Applications by shipment.  Multiple running applications.

.NET Resources  ASP.NET –  AspAdvice –  Windows Forms –  Architecture – msdn.microsoft.com/architecture .NET News –

What are Windows Services?  Applications (Database, Web Server, …).  Good for long running / complicated operations.  Run all the time.  No User Interface.  Run within their own security context.  Limited access to local resources.  Limited access to remote resources.  Debugging.  Non-interactive.

Design Guidelines  Consistency.  No popup messages.  Information/Errors need to be written to somewhere.  EventLog.  Database.  Be careful blocking.

Types of.NET Applications  ASP.NET.  Web Services.  WinForms.  Components.  Windows Services.  Others.

.NET Support for Services  System.ServiceProcess namespace.  Inherit from the ServiceBase Class.  Installation.  ServiceController Class Allows communication from authorized user (WinForms, ASP.NET, or other) to a Service (thru SCM).

Languages Support  C++ (Managed & Unmanaged).  Visual Basic.  C#.  Other.NET Languages.

Parts of a.NET Windows Service  Service Control Manager (SCM).  System.ServiceProcess.ServiceBase class  Events.  Installation.  Process Installation.  Service Installation.

Events in ServiceBase  OnStart().  OnStop().  OnPause().  OnContinue().  OnShutdown().  OnPowerEvent().  OnCustomCommand().

OnStart() Event  Called when the Service is issued the start command.  VB Syntax: Protected Overridable Sub OnStart ( _ByVal args() as String )  Hard to Debug By Default.

Debugging the OnStart() Event  Create a dummy service that is a part of your process.  Start the dummy service to start the process.  Attach to running process.  Place breakpoint.  Start “real” service.

OnStop() Event  Called when the Service is issued the stop command.  Protected Overridable Sub OnStop().

OnPause() Event  Called when the Service is issued the pause command.  Protected Overrideable Sub OnPause().

OnContinue() Event  Called when the Service is issued the continue command.  Protected Overrideable Sub OnContinue().

OnShutdown() Event  Called when the System sends the shutdown command to all Applications specifying that a system shutdown is inprogress.  Similar to the OnStop() event.  Protected Overrideable Sub OnShutdown().

OnPowerEvent() Event  Called when the computer’s power status has changed. Typically, this applies to a laptop computer when it goes into a suspended state.  Not the same as a system shutdown.  Protected Overrideable Function OnPowerEvent( ByVal powerStatus as PowerBroadcastStatus ) as Boolean  Boolean return value is a response to a QuerySuspend broadcast.  True = Application is in a state where a suspend is ok. False = suspend is not ok.  PowerBroadcastStatus is an enumertion with 9 values.

OnCustomCommand() Event  Executed when a custom command is passed from the SCM to the service.  Protected Overridable Sub OnCustomCommand( ByVal command as Integer )  Command values between 128 & 255.

Security Context  Service runs within a defined security context (UserId/PassWord).  What you do not necessarily have access to:  Desktop.  Remote Resources.  Mapped Drives.  What you do have access to:  Local FileSystem.  Network Protocols (TCP/IP, …).  Database (ODBC, OleDb, MP).

Custom Commands / ServiceController  Use the ServiceController class.  ExecuteCommand( ByVal command as Integer ) method.  Start, Stop, Pause, Continue.  MachineName, ServiceName, Status properties.

Installation  Each executable must have a process installer.  Each service within a process must have a service installer.  Command line utility (installutil.exe)

App.Config  XML Format.  Excellent for read only information.

Great, Now What can You do with a Service?  Listen for events to occur.  Network requests.  Timer countdown.  Messages arriving in a message queue.  File system changes.  Other.

Example  Timer.  When the Timer counts down to zero, an event fires and our application performs an operation.  No continual polling occurs, no blocking, and no extra processing occurs on the system.

What’s Not to Like?  Requires the.NET Framework.  If a framework exception occurs when the framework stops, the Windows Service stops…….and there is nothing within the framework to restart that Windows Service.  Problem is rare, but possible. (ODP.NET users, problem has been resolved)

Monitoring a Windows Service  Need something that won’t stop.  Can do it with.NET and a Console application.  Drop back to COM/API.  Use WMI & “Scheduled Tasks.”  Use ServiceController class.  Run every few days/hours/minutes to monitor the status of your Service.

Things to look at / Last Thoughts  Event Processing vs. Blocking.  EventLog.  Multiple Threads of Execution.  Weak References.  Performance Monitor Integration.  Nothing wrong with Interop.

Questions?  Scalable Development, Inc.  Consulting & Development Services.    END Scalable Development, Inc. Building systems today that perform tomorrow.