Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 19th, 2004, 02:16 PM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Printing to a network printer via ASP

I'm trying to write some data out to a tag printer via ASP. The data needs to go out through LPT2:, which is mapped to the shared printer.

I've tried using a FSO to write to it directly. I've even managed to write a script for windows scripting host and invoke it from ASP, using standard output redirection (">") to redirect output to a file with no problems.

However, I can't seem to send writes to LPT2: from ASP, even through the other script.

It works perfectly fine if I invoke the WSH script at a command prompt using precisely the same command line, but when I do it from inside an ASP page, I get nothing.

Are there some permissions for the port I have to set or some such? I honestly have no idea how to get it to work.

If it is relevant, LPT2: is a mapped port for a network printer.

The command line in question I'm trying to fire off from ASP is: "%comspec% /c cscript C:\HttpRequester.vbs http://localhost/FullTagRun.asp?OrderNo=" & Request("OrderNo") & " > LPT2:" which works perfectly fine if I use a filename rather than LPT2:, but the data needs to go out via LPT2:.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Printer on different Network ayazhoda Windows Server 1 November 18th, 2007 01:34 PM
Network printer addresses interrupt Javascript How-To 6 September 2nd, 2004 10:37 AM
Printing with default printer lletnek Beginning VB 6 1 March 4th, 2004 06:26 PM
Printing directly to a printer Louisa VB.NET 2002/2003 Basics 4 January 16th, 2004 09:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.