Printers

TechRepublic Tutorial: Add Internet-based printing to your Windows 2000 Server

Learn how to configure Windows 2000 Server to take advantage of Internet-based printing and always have a printer at your beck and call.

Computers are getting better all the time, so why is it that there never seems to be a printer free when you want one? Fortunately, this frustrating printing phenomenon is on its last legs, thanks to Internet-based printing. With Internet-based printing, you don’t have to be logged on to your network or have a printer directly attached to your workstation to print. All you have to do to take full advantage of this incredibly useful feature is to make some changes to your Windows 2000 Server. After that, you will always have a printer at your beck and call. Here’s how to configure Windows 2000 Server to take advantage of Internet-based printing.

Who needs Internet-based printing?
Here’s one good example of how handy Internet-based printing capabilities can be:
These days when I travel, I find that Internet-based printing works much better than using fax software (which allowed me to “print” via a fax machine). First, there’s the issue of those pesky long distance bills that are associated with faxing. Although there are still quite a few hotels that are behind the times, many hotels and conference centers are starting to offer wireless Internet access. This means that I can access the Internet without having to dial into an ISP, and therefore have no long distance phone bills. Once connected to the Internet, I can print to a printer that’s attached to the Web server in my home.

Some hotels also have Web accessible printers set up. I’ve stayed in hotels in Miami and in Las Vegas in which it was possible to use the Internet to print to a printer within the hotel. I just put my room number on the first page of the print out and a bellman delivered the printed document to my room.

Of course other people can print to Web accessible printers too. For example, if you were staying at a hotel and were going to go over a proposal with a client, but there was a change to the proposal, the people in your office could send the changed pages directly to the hotel’s printer. It would be as if your coworkers had sent you a fax, but the document would have much better print quality because it came from a printer. When faxing, the quality of the output simply isn’t on par with the output from laser printers. As well, there are features standard to most printers that simply aren’t available to you if you send a document to a fax machine. Some of these features include things like built-in fonts, double-sided printing, and color printing.

It’s in there!
By far the best thing about this functionality is the fact that it’s built in to both Windows 2000 and Windows XP. The Web printing capability is a part of the machine’s default Web site. Before you get too excited though, there’s a major limitation that you need to know about. Windows 2000 Professional and Windows XP both use Personal Web Server. Personal Web Server has a limit of 10 simultaneous connections. Therefore, unless you have a really small organization, you probably don’t want to use Windows 2000 Professional or Windows XP to host Web-based printing services.

Windows 2000 Server, on the other hand, includes Internet Information Server, and is therefore suited to service a multitude of simultaneous connections. Because of this, the remainder of the article assumes that you’re using Windows 2000 Server.

The Web printing services are a part of the server’s default Web site. You can access the Web printing services by opening your Web browser and entering http://servername/printers. For example, I have a couple of printers connected to a server named Tazmania. For me to access that print server through a Web Browser, I’d enter http://tazmania/printers into Internet Explorer’s address bar. You can see an example of what the Web based print server looks like in Figure A.

Figure A
This is what the Web-based print server looks like.


The anatomy of a Web print server
The Web-based print server is a part of your server’s default Web site. However, that doesn’t mean that the code for the Web-based printer is found in the \INETPUB\WWWROOT folder with the rest of the default Web site.

To locate the code for the Web-based print server, open the Internet Services Manager utility found on the Administrative Tools menu. When the console opens, navigate through the console tree to Internet Information Services | Your server | Default Web Site. If you click the plus sign to the left of the Default Web Site, the Web site will expand to reveal all of its various components, as shown in Figure B. Since the Web-based print server’s URL is http://servername/printers, look through the list until you locate a container called Printers.

Figure B
Locate the Printers object beneath the Default Web Site.


At this point, right click on the Printers object and select the Properties command from the resulting context menu. When you do, the Printers properties sheet will appear. Select the properties sheet’s Virtual Directory tab and then look at the Local Path section. The Local Path provides the actual path to the code used to control the Web-based print server. The actual location will differ from server to server, but as you can see in Figure C, the code exists in the C:\WINNT\WEB\PRINTERS folder on my server.

Figure C
You can find the Web-based print server’s actual location by looking at the Printer Properties sheet.


If you browse through your server’s hard disk to the location specified in the Local Path, you’ll find that the printer’s directory is full of ASP files. If you have experience in ASP programming, you can modify the code to create a custom print server environment. In fact, I recently saw someone write an application that displayed a graphic of his corporate campus. On the map, there were printer icons representing the locations of the various network printers. Users could click on the printers to connect to them or to check the print queue.

Making your Internet printer publicly accessible
You might have noticed in my previous screen captures that my Internet printers all existed on my private network rather than being publicly accessible. However, there are a couple of ways of making an Internet-based printer publicly accessible. One way is to have the printers directly connected to your Web server. That usually isn’t a desirable configuration though, because you don’t want your users to have to go into the computer room to get their printouts.

A better solution is to use external print servers. You might have noticed the HP LaserJet printer referenced in my screen captures. This particular printer isn’t directly attached to my server. Instead, it’s connected to the network via an HP JetDirect print server. The reason that the printer is accessible through the server’s Web site is that the server hosts the printer’s print queue. Therefore, when a user sends a print job to the printer, the print job goes to the server with the Web site.

The server then sees the JetDirect print server as an external printer port, and sends the print jobs to it. The JetDirect box then spools the print jobs to the printer. This particular configuration is a little redundant, but it does prevent me from having to attach the printer directly to my Web server.

Now that you know how the printers are physically attached to the server, let’s take a look at how to make the print server Web site publicly accessible. There are a lot of different ways to accomplish this task. One way is to take the code from the print server Web site and integrate it into your existing Web site.

Another way is to configure your publicly accessible Web server to call the print server on your private network. I don’t really recommend using this approach though because it exposes your network to security risks.

Still another way to get the job done is to simply make the print server Web site directly accessible to the Internet. Like any Web site, doing so requires you to have a dedicated, static IP address that you can assign to the server. Once you’ve acquired such an address, open the server’s Control Panel and double click on the Network And Dial Up Connections icon. When the Network and Dial Up Connections window opens, right click on the network connection that the machine uses to connect to the Internet, and then select the Properties command from the resulting shortcut menu to reveal the connection’s properties sheet. At this point, select Internet Protocol (TCP/IP) from the list of installed components and click the Properties button to reveal the TCP/IP Properties sheet. Now, click the Advanced button at the bottom of the properties sheet to reveal the Advanced TCP/IP Settings properties sheet.

Right now, the IP Settings tab of the properties sheet should be selected. What a lot of people don’t realize is that Windows allows you to assign multiple IP addresses to a single network adapter. Therefore, you can click the Add button and add the static IP address to the private address that’s already assigned to the adapter. Now, click OK several times to close all of the open windows. An alternative to this technique is to install an additional adapter and assign your static IP address to it. It doesn’t matter which technique that you use because either one will work.

Now that you’ve assigned the static IP address to the adapter, you’ll probably have to reconfigure your firewall in a way that places the static IP address into a DMZ. Servers placed into the DMZ are publicly accessible through the Internet, so be careful in terms of what all is loaded onto your server. If you have some security concerns, you could create a dedicated print server and make it Web accessible.

Now that the machine is Web accessible, you must configure the Print Server Web site to be associated with the static IP address that you’re using. To do so, open the Internet Services Manager, and select the server’s default Web site. Right click on the default Web site and select the Properties command from the resulting shortcut menu to reveal the Web site’s properties sheet. Now, make sure that the Web Site tab is selected and then locate the IP Address section. By default, the IP Address is set to All Unassigned. Use the drop down arrow to select the Static IP address from the list of IP addresses. Click OK and the site will be configured to use the address that you’ve chosen.

The final step in making the site publicly accessible is to update your DNS Server and associate a domain name with the IP address. Remember that the Printers folder is a logical branch off of the default Web site. Therefore, whatever you name the Web site will have the /printers path appended to it. For example, my Web site is named www.brienposey.com. Therefore, if I used this technique, then the Printers page would be located at www.brienposey.com/printers.

A word about security
So far I’ve shown you how to make the default Web site publicly accessible and how to access the print server as an extension of the default Web site. However, in the real world, making the default Web site publicly accessible is a bad idea. The Default Web site contains sample data and administrative programs that you probably don’t want to give the world access to. Therefore, if you’re going to be using a dedicated print server, I recommend that you modify the Default Web Site in a way that makes only the Printers folder publicly accessible.

The easiest thing to do is to replace the default Web site’s path with the Printers Web site’s path. After doing so, you can delete all of the unused components in the Default Web Site folder. To change the path, right click on the Default Web site and select the Properties command from the resulting context menu. When the Web site’s properties sheet appears, select the Home Directory tab.

Replace the existing local path with the Printers Web site’s local path and click OK. You can now delete all of the objects found beneath the Default Web Site (except for the Printers container and its contents) by right clicking on them and selecting the Delete command from the shortcut menu.

After redirecting and cleaning up the Default Web Server, I strongly recommend running the IIS Lockdown Tool and the Microsoft Baseline Security Advisor (MBSA). Both tools are available from the Microsoft Web site and will help you to further secure your Printers Web site.
2 comments
Schwenie
Schwenie

WE use IIS on our print server and I have tweaked the ASP files to make it easier for our staff to add printers to clients via the web page. I cannot figure out how to re-order the alphabetic list of printers. Any ideas?