Jul 02
Customize the Internet Printing URL Using Server 2008 R2

One of the many useful Windows services is the Print and Documents Services Internet Printing Role. Using Windows Server 2008 R2 you can enable the Print and Document Services and add Internet Printing Role using the Server Manager.

ADD THE ROLE

  • Open the Server Manager
    • Start > Administrative Tools > Server Manager
  • Select Roles > Add Role > Next > Select Print and Document Servers and Web Server (IIS) > Next

With this role enabled you will be required to install the Internet Services Web Server as well (IIS). Once you have enabled this Role you will be able to browse to the http://localhost/printers and view the list of available printers you have installed drivers for and shared using the web.

CUSTOMIZE THE WEB PRINTING URL

Rather than exposing the FQDN server name (\\servername\printers\) you can create a friendly URL that everyone could use such as http://print.sitename.com.

To do this you will need to make a few changes to the default setup.

CREATE AND ADD THE CUTOMIZED WEBSITE

Open Internet Information Services (IIS) Manager

  • Start > Administrative Tools > Internet Information Services (IIS) Manager
    • Expand the server options in IIS Manager

  • Select Add Web Site…
    • Name it print.sitename.com
      • Make certain to assign a registered DNS IP to the site Host name.

  • Add a Virtual Directory
    • Right Click the newly created website
      • Select Add Virtual Directory…

  • Apply the settings as shown here
    • I suggest browsing to the following location C:\Windows\Web\Printers rather than typing it.

  • Click the newly created Virtual Directory (Printers) and in the main Home pane you will see Default Document
    • Open this and Add… ipp_0001.asp and (Move Up) it to the top of the list of items.

  • The ipp_001.asp page is the main page referenced when connecting to the web printers page (See Image)


HTTP REDIRECT

  • Create an HTTP redirect by opening the HTTP Redirect option on the IIS Home
    • Open HTTP Redirect and enable Redirect requests to this destination:
        • When End-Users navigate to the site URL http://print.sitename.com it will redirect them to the virtual /Printers location. The advantage of this is that End-User does not need to remember anything other than the print in-front of the more familiar domain name.

MODIFY THE .ASP PAGES

  • On the server navigate to C:\Windows\Web\Printers
    • Take ownership of the ipp_0001 and ip_0004 asp files since these system files are protected
      • Right click the file > Properties > Security Tab > Advanced > Owner > Edit > Click your Current Account > Click OK, OK
        • Add your account to the Security Group by clicking Edit…
          • Click Add… > add the Current Signed in Account > Give it Full control
  • Open the files in text pad and locate the following and modify it as required.
    • In both files, find the line:
      • If strComputer = "localhost" Or strComputer = "127.0.0.1"
        • Modify the line to look like this
          • If strComputer = "localhost" Or strComputer = "127.0.0.1" Or strComputer = "print.sitename.com"
            • Notice that you are adding the Full Qualified Domain Name (FQDN) that you want to use.
    • Save the changes and reboot the server.

ADDING PRINTERS

  • When adding a printer you may receive the following
    • Printer installation failed the printer name is invalid

Comments

does not work dont try

This doesn't work don't try it, it broke my system
 on 4/10/2014 1:26 PM

 ‭(Hidden)‬ Blog Tools