Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


June 1997

Develop a Windows NT Internet Service


RSS
Subscribe to Windows IT Pro | See More Internet Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

Learn how an Internet protocol, such as Finger, can run as a Windows NT service

Millions of users access the Internet through systems running Windows or Windows NT. When you use NT to access Internet services such as Finger, Gopher, or Archie, you ordinarily start them individually at the command line (i.e., outside NT). Instead of starting these programs individually, try running them as NT services so that you can access them from within NT whenever you want.

In this article, I explain Finger (an Internet service that lets you query for information about Internet users or sites) and an NT Finger service I developed. In a longer version of this article, available on the Web at http://www.winntmag.com, I explain in detail how the NT Finger service works and provide the code for it.

What Is Finger?
Finger is a daemon that lets Internet users (Finger clients) query a Finger server for information about other Internet users or sites and returns responses to queries. With Finger, you can find out a user's (account owner's) full name, the last time that user logged on, and which users are currently logged on. A Finger operation can also return a plan, or finger, file--a text file that contains detailed information about an account owner, such as the user's degree, office hours (for a professor), resumés, or even Pretty Good Privacy (PGP) keys for digital signatures.

How to Finger an Account
Many operating systems, including NT, provide a small application that lets you Finger for remote users from the operating system's prompt. To use Finger with NT, from the command prompt, you simply enter

finger accountname

to resolve a remote address and query the remote host for the specified user.

Screen 1 shows an example of using Finger with a remote UNIX host. In Screen 1, I first accessed a remote UNIX host via Telnet. Then at the prompt, I entered finger

etoupin@csn.net

to query a Finger daemon in the csn.net domain (Colorado Supernet Internet Service Provider--ISP) for user etoupin. The Finger client waits until it receives a response or a timeout occurs, and displays the returned information as shown.

The NT Finger Service: How It Works
The NT Finger service is a standard, event-driven service that resides in the Service Control Manager (SCM) database. You control this service through the SCM. This service monitors the Finger TCP port (79) for requests and is transparent to the user of the system on which it resides.

A Finger service must have access to a database of users and user information. From this database, the Finger service formats and submits information to remote requesting client systems. The NT Finger service obtains this information from the Security Accounts Manager (SAM) database.

The Finger service provides a simple executable module that the SCM manages. At NT startup time, when SCM starts the Finger service, the service creates a socket and then awaits incoming connect requests from remote clients.

The NT Finger Service: Take It from Here
Finger is an easy protocol to implement as a service. You can take the service code, enhance it, extend the protocol's functionality, or even create a new service to support another Internet protocol.

Note that many other Internet protocols--such as Simple Mail Transfer Protocol (SMTP), Post Office Protocol (POP), HTTP, and FTP--are more complex than Finger. Thus, NT services for these protocols require you to write additional code, such as worker threads, or use the Visual C++ (VC++) C Thread class to handle simultaneous requests and concurrent operations as the protocol requires. The online Finger service code is a basic template that you can use for many other Internet protocol services.

For a more detailed explanation and complete code, visit http://www.winntmag.com.

End of Article



Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
10 Reasons to Deploy Windows Vista

The decision to upgrade your XP systems to Vista is simple when you consider features such as easier backup, a great desktop search, and vastly improved security options. ...

10 Reasons Not to Deploy Windows Vista

The decision to upgrade to Vista has to make business sense, but many companies find the costs in training and application compatibility problems outweigh any benefits Vista brings. ...

WinInfo Short Takes: CES 2009 Special Edition

An often irreverent look at some of the week's other CES 2009 news, including covering the Vegas spectacle from the comfort of my own home, Windows 7 public beta, a weird Microsoft song application, Palm Pre, pending Microsoft mobile moves, and much more ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing